'Premature end of script headers' error when starting Apache in boot time
Greeshma
greeshma at mediaglue.co.jp
Wed Feb 25 01:38:37 EST 2004
Hi all,
I have successfully configured Apache 2.0.4 with RedHat 7.3
and use Python 2.2.3 for cgi scripts.
When I start Apache manually through /usr/local/apache/bin/apachectl startssl,
I can execute the cgi scripts without any problem from the
browser. This works fine.
When I put the Apache start line in /etc/rc.local file so that Apache starts automatically at boot time, Apache starts without any problem, and I can access the HTML pages.
But in case of CGI scripts, I get '500 internal server error'
on the browser, and 2 errors in the error log '/usr/bin/env: python: No such file or directory, referer: ..' and 'Premature end of script errors'. In both cases, apache runs as root.
I dont know much about this, but it seemed to be a permission
problem, so confirmed that 755 is set for my cgibin directory. /usr/local/bin/python also has 755 permissions.
This has not helped. Its not finding python, but I dont know
how to fix it. At this point, if I stop Apache and restart it manually,
everything again works fine.
Any ideas? Any help would be highly appreciated.
Rgds
Greeshma
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20040225/83d68869/attachment.html>
More information about the Python-list
mailing list