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

G

Greeshma

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
 
Y

yepp

Greeshma said:
Hi all,

I have successfully configured Apache 2.0.4 with RedHat 7.3
and use Python 2.2.3 for cgi scripts.
....... /usr/local/bin/python also has 755 permissions. .......

but it may not be in root's PATH. Try fiddling with the environment
variables.
yepp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top