I’ve made a hello.py file in the cgi-bin directory. The contents of the file are:
#!/usr/bin/env python
print(“Content-Type: text/plain”)
print(“”)
print(“Hello World!”)
Then in the browser I open /cgi-bin/hello.py and get a 500 server error.
I’ve tried with/without parenthesis on the print lines.
I’ve tried using the web file manager to set file permissions to 777.
Where do I get more information about this error?
Should this work, or what should I be doing?
Answer #1
Hello! Try setting the first line to the following:
#!/usr/bin/python
Then set the permissions to 755 rather than 777, and it should work normally for you.