using python as cgi on apache unix

Dennis Reinhardt DennisR at
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/

What do you get when you type "" 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

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

Dennis Reinhardt

More information about the Python-list mailing list