Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > 'Premature end of script headers' error when starting Apache inboot time

Reply
Thread Tools

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

 
 
Greeshma
Guest
Posts: n/a
 
      02-25-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
 
Reply With Quote
 
 
 
 
yepp
Guest
Posts: n/a
 
      02-27-2004
Greeshma wrote:

> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
3 ESSENTIAL TOOLS FOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLSFOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLS FOR STARTING ANDMAINTAINING... Oanh Bui C++ 0 04-27-2009 12:51 PM
3 ESSENTIAL TOOLS FOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLSFOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLS FOR STARTING ANDMAINTAINING... Oanh Bui C Programming 0 04-27-2009 12:51 PM
3 ESSENTIAL TOOLS FOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLSFOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLS FOR STARTING ANDMAINTAINING... Oanh Bui Python 0 04-27-2009 12:46 PM
starting apache with mod_perl, error on Apache.pm Selmar Perl Misc 2 07-21-2004 09:53 PM
'Premature end of script headers' error when starting Apache inboot time Greeshma Python 0 02-25-2004 04:44 AM



Advertisments