By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,201 Members | 934 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,201 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.