insomniaweek
New Member
- Messages
- 1
- Reaction score
- 0
- Points
- 0
Please help, I've spent nearly an hour trying to get python cgi scripts to work. Can someone please explain how I do this?
I put test.cgi in my cgi-bin folder with
in it and saved it. However, when I open it, I get a 500 server error. Please help.
I've tried :
-Changing the code to /user/local/bin/python, /user/local/bin/env python, /user/bin/env python
-Putting it in /scgi-bin
-Changing the main code to a dozen simple varients
-Saving as test.py and making the apache handler cgi-script for .py files
I put test.cgi in my cgi-bin folder with
Code:
#!/usr/bin/python
print "Content-Type: text/plain\n\n"
import sys
print sys.version
print sys.modules
in it and saved it. However, when I open it, I get a 500 server error. Please help.
I've tried :
-Changing the code to /user/local/bin/python, /user/local/bin/env python, /user/bin/env python
-Putting it in /scgi-bin
-Changing the main code to a dozen simple varients
-Saving as test.py and making the apache handler cgi-script for .py files