470,831 Members | 1,407 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,831 developers. It's quick & easy.

'Premature end of script headers' error when starting Apache inboot time

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.

Jul 18 '05 #1
0 1266

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Wayne Deleersnyder | last post: by
1 post views Thread by Christoph Burschka | last post: by
15 posts views Thread by Lawrence Krubner | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.