hi all - i'm having trouble running cgi scripts on godaddy and godaddy support hasnt been helpful at all. I'm hoping someone here knows what the problem is.
1. I'm trying to install moinmoin (wiki) on my godaddy account.
2. my godaddy account is non-dedicated (ie, i dont have shell acess, but i do have an ftp program that can transmit raw commands). Also, my account does supposedly support python, php, ruby, and a few other things.
3. While going thru the moinmoin install, it said to test my python on my server by running a small .cgi script called "pythontest.cgi".
4. It said to upload it in ASCII mode, then put it into my 'cgi folder', and then execute it.
5. I did everything it said: uploaded in ascii, put it in cgi folder, and tried to execute it via a browser, by putting 'pythontest.cgi' as part of a URL path.
I got an 'internal server error'. I double checked permissions and paths, and both seem fine.
The server error log reports the following:
------------
File "/home/content/j/a/k/jak68/html/cgi/pythontest.cgi", line 2
echo content-type: text/html
^
SyntaxError: invalid syntax
[Thu Jun 1 03:15:34 2006] [error] [client 24.199.99.203] Premature end of script headers: /var/chroot/home/content/j/a/k/jak68/html/cgi/pythontest.cgi
------------
(My feeling is that its not a real syntax error; i've checked the syntax and it looks ok to me - am i missing something?)
The file I'm trying to run looks like this: (its called pythontest.cgi):
----------------
#!/usr/bin/python
echo Content-Type: text/html
echo
echo "Your web server is running as:"
id
echo "CGI scripts work"
echo "Now we try to invoke Python interpreters and get their versions:"
echo "Your default version of python is:"
python -V 2>&1
echo
echo "Available versions of python are:"
python2.2 -V 2>&1 && which python2.2
python2.3 -V 2>&1 && which python2.3
python2.4 -V 2>&1 && which python2.4
python2.5 -V 2>&1 && which python2.5
echo "Finished."
--------------------
Any ideas on what might be the problem?
thanks much for any help...
1. I'm trying to install moinmoin (wiki) on my godaddy account.
2. my godaddy account is non-dedicated (ie, i dont have shell acess, but i do have an ftp program that can transmit raw commands). Also, my account does supposedly support python, php, ruby, and a few other things.
3. While going thru the moinmoin install, it said to test my python on my server by running a small .cgi script called "pythontest.cgi".
4. It said to upload it in ASCII mode, then put it into my 'cgi folder', and then execute it.
5. I did everything it said: uploaded in ascii, put it in cgi folder, and tried to execute it via a browser, by putting 'pythontest.cgi' as part of a URL path.
I got an 'internal server error'. I double checked permissions and paths, and both seem fine.
The server error log reports the following:
------------
File "/home/content/j/a/k/jak68/html/cgi/pythontest.cgi", line 2
echo content-type: text/html
^
SyntaxError: invalid syntax
[Thu Jun 1 03:15:34 2006] [error] [client 24.199.99.203] Premature end of script headers: /var/chroot/home/content/j/a/k/jak68/html/cgi/pythontest.cgi
------------
(My feeling is that its not a real syntax error; i've checked the syntax and it looks ok to me - am i missing something?)
The file I'm trying to run looks like this: (its called pythontest.cgi):
----------------
#!/usr/bin/python
echo Content-Type: text/html
echo
echo "Your web server is running as:"
id
echo "CGI scripts work"
echo "Now we try to invoke Python interpreters and get their versions:"
echo "Your default version of python is:"
python -V 2>&1
echo
echo "Available versions of python are:"
python2.2 -V 2>&1 && which python2.2
python2.3 -V 2>&1 && which python2.3
python2.4 -V 2>&1 && which python2.4
python2.5 -V 2>&1 && which python2.5
echo "Finished."
--------------------
Any ideas on what might be the problem?
thanks much for any help...