Forum Moderators: bakedjake
I cannot execute a FCGI script in python on my web server. When i execute it using the command line "python hello.fcgi" i get a normal response
Status: 200 OK
Content-Type: text/plain
Content-Length: 13
Hello World!
However when i try to go to the web page i get a 500 error. I get this error message "FastCGI: incomplete headers (0 bytes) received from server" so i tried to execute the script using the sell "./hello.fcgi" and i got this error message ": bad interpreter: No such file or directory"
Here is the code:
#!/usr/bin/python
from fcgi import WSGIServer
def myapp(environ, start_response):
start_response('200 OK', [('Content-Type', 'text/plain')])
return ['Hello World!\n']
WSGIServer(myapp).run()
Thank You very much!
James