So much for the helpful members of this forum.
1. Make sure the script has permissions set to 0755
2. Script should have rough outline like:
Code:
#!/usr/bin/env python
import os
import sys
print("Content-type: text/html")
print("")
print("<html>")
print("<body>")
print( "GET / POST Information")
print("<pre>")
print "Request method: " , os.environ[ 'REQUEST_METHOD' ]
print "Query string: " , os.environ[ 'QUERY_STRING' ]
count = 0
for line in sys.stdin:
count = count + 1
print line
if count > 100:
break
print ""
print("</pre>")
print("</body>")
print("</html>")
Make sure you print out the HTTP Content header before any output. Follow it by a blank line. They are running Python 2.6 I think. Definitely not 3.
3. If the script is in cgi-bin , you should be set to go
If it is anywhere else, make sure you have a line:
Code:
AddHandler cgi-script .py
in your .htaccess file
4. If your script still flubs, post any error messages back here and I can try to help.