cancel
Showing results for 
Search instead for 
Did you mean: 

CGI and MYSQL Issues

mandlwilson
Newbie
Posts: 3
Registered: ‎20-07-2010

CGI and MYSQL Issues

Hi All
Below is a copy of a question that I posted to plusnet support and they suggested I posted it here. If anyone is able to help that would be marvelous.
I seem to be having issues using php and cgi scripts, every script I've used mainly copied from the help pages of plus net doesn't seem to work.
For example:
http://community.plus.net/library/website-design/a-beginners-guide-to-php/#withcgi 6. Example 2 - Using PHP with simple MySQL database
I created the script contained in that section with my login details but when I run http://ccgi.mandlwilson.plus.com/mydbtest.php I get the following message

Parse error: syntax error, unexpected '=' in /share/storage/03/ma/mandlwilson/mydbtest.php on line 10
All the other scripts that I am attempting to run mainly http://ccgi.mandlwilson.plus.com/setperms.cgi which is another script which I got from the user forums is bringing up a Server error!
The server encountered an internal error and was unable to complete your request.
Error message:
Premature end of script headers: setperms.cgi
Ultimately I am attempting to create a wordpress blog.
Thank you for any help you can give.
Many thanks
Mark Wilson
4 REPLIES 4
Gabe
Grafter
Posts: 767
Registered: ‎29-10-2008

Re: CGI and MYSQL Issues

Have you set the permissions on the setperms.cgi script to 700?
Gabe
mandlwilson
Newbie
Posts: 3
Registered: ‎20-07-2010

Re: CGI and MYSQL Issues

Sorry for lack of replies to this, been a very hectic few days.
The permissions of setperms.cgi are indeed set to 700.
I am beginning to suspect it might have something to do with htaccess which is a folder I keep seeing mentioned but don't seem to have.
If I do need a htaccess folder do I just create one or do I have to get plusnet to do that for me?
Thanks for now
Mark
Gabe
Grafter
Posts: 767
Registered: ‎29-10-2008

Re: CGI and MYSQL Issues

I guess the first thing to try would be uploading the script again, making sure the ftp client is set to upload as ascii. If that doesn't work, perhaps check that the ftp client is set to show hidden files, just in case you already have a .htaccess (a file, unlike htdocs which is a folder) which might contain a line that could stop the script running.
Gabe
mandlwilson
Newbie
Posts: 3
Registered: ‎20-07-2010

Re: CGI and MYSQL Issues

Thanks Gabe,
Will try that when I get home - can't do it at the mo cos I'm not on a plusnet connection at work