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

Discussion in 'Python' started by Greeshma, Feb 25, 2004.

  1. Greeshma

    Greeshma Guest

    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
     
    Greeshma, Feb 25, 2004
    #1
    1. Advertising

  2. Greeshma

    yepp Guest

    Re: 'Premature end of script headers' error when starting Apache in boot time

    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
     
    yepp, Feb 27, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wayne Deleersnyder

    Premature end of script headers

    Wayne Deleersnyder, Nov 21, 2003, in forum: Perl
    Replies:
    1
    Views:
    678
    Wayne Deleersnyder
    Nov 21, 2003
  2. Greeshma
    Replies:
    0
    Views:
    358
    Greeshma
    Feb 25, 2004
  3. Phil Frost

    Re: premature end of script headers

    Phil Frost, Jul 10, 2004, in forum: Python
    Replies:
    0
    Views:
    553
    Phil Frost
    Jul 10, 2004
  4. Kevin Layman
    Replies:
    3
    Views:
    142
    Diego Guillen
    May 22, 2009
  5. wana
    Replies:
    0
    Views:
    184
Loading...

Share This Page