Python + Apache 1.3.x (CGI) not working (no mod_python)
genablu at my-deja.com
genablu at my-deja.com
Fri Jul 14 04:40:13 EDT 2000
Please help!
I am running the following Python program:
#!/usr/bin/python
print 'Content-type: text/plain'
print ' '
print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">'
print '<HTML><HEAD><TITLE>cgi-bin test</TITLE></HEAD>'
print '<BODY>Hello, World!</BODY></HTML>'
in my /home/httpd/cgi-bin directory. Permissions are set to 755, chown
root.nobody.
When I try requesting http://myserver.domain.com/cgi-bin/hello.py I get
the following error:
INTERNAL SERVER ERROR
The server encountered an internal error or misconfiguration and was
unable to complete your request.
malformed header from script. Bad header=:/home/httpd/cgi-bin/hello.py
The equivalent PERL program works just fine.
Here are the modules built into my Apache server:
httpd -l
Compiled in modules:
http_core.c
mod_so.c
What am I missing? Why doesn't this work but the PERL program does?
I would like to run this script by spawning the Python interpreter
rather then compiling it as a module. Is this possible? I'm aware this
might be an Apache question; can you point me to a good place to learn
how to solve this in Apache?
I've been fighting this for a loooong time! Can someone please help?
Thanks!
Gena Bleu
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list