using python as cgi on apache unix

Dennis Reinhardt DennisR at dair.com
Tue Sep 17 10:59:32 EDT 2002


> ... want to move this to my unix server.  Unfortunately, no matter what I
> do I can not get apache on my linux box to execute any python scripts.  I
> get the following errors in apache:
> Premature end of script headers: /var/www/html/cgi-bin/test.py

What do you get when you type "test.py" at the shell prompt when logged into
the cgi directory on the RH box at the command line?  Do you get:
---
---
Content-Type: text/html
---
hello

where "---" is taken as a blank line?  I agree with Gerhard that the initial
print "\n\n" is wrong.  But your comment trying the cgi.test suggests that
something else is going on.  The above test may sniff out that something
else.


Dennis Reinhardt

http://www.dair.com





More information about the Python-list mailing list