1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Premature end of script headers: index.php (error 500)

Discussion in 'General Discussion' started by hm2k, Nov 17, 2009.

  1. hm2k

    hm2k Member

    Joined:
    Jul 19, 2005
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    A bunch of sites on a cPanel server are giving me "500 Internal Server Error".

    Checking the "/usr/local/apache/logs/error_log", I see the following:

    [Tue Nov 17 14:51:13 2009] [error] [client x.x.x.x] Premature end of script headers: index.php
    [Tue Nov 17 14:51:15 2009] [error] [client x.x.x.x] Premature end of script headers: index.php
    [Tue Nov 17 14:51:17 2009] [error] [client x.x.x.x] Premature end of script headers: viewtopic.php
    [Tue Nov 17 14:51:17 2009] [error] [client x.x.x.x] Premature end of script headers: index.php

    "index.php" belongs to a drupal based site and/or a phpbb3 based site.

    "viewtopic.php" belongs to a phpbb3 based site.

    I can't figure out why I'm seeing this error.

    To my knowledge, nothing has changed on the site or the server.

    I've tried stopping/killall/starting httpd and mysqld.

    I've tried recompiling php and apache.

    A server reboot made no change, errors remain.

    I'm at a loss of which direction to take this, any ideas?

    Thanks.
     
    #1 hm2k, Nov 17, 2009
    Last edited: Nov 17, 2009
  2. hm2k

    hm2k Member

    Joined:
    Jul 19, 2005
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    Update:

    We've come across this problem before...

    We discovered that this was due to a 2GB suphp log file which the Apache HTTPD was unable to handle.

    The cPanel software should have recognised the file was too large and dealt with it accordingly.

    We have enabled the Apache Log Rotation (apache_log_rotation.pl) for suphp_log file that was causing the problem.

    This should be enabled by default.
     
    #2 hm2k, Nov 17, 2009
    Last edited: Nov 17, 2009
  3. mickbeng

    mickbeng Member

    Joined:
    Oct 3, 2006
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Penang, Malaysia
    What is the PHP version and Zend Optimizer version for your box?
     
  4. stugster

    stugster Member

    Joined:
    Apr 16, 2002
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Edinburgh, UK
    Why is this not on by default?
     
  5. txspaderz

    txspaderz Member

    Joined:
    Jun 4, 2008
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Houston
    Why? This is an Apache limitation, not cPanel. Even Apache does not tell you that a log file is full when it is.

    My suggestion? Upgrade to Apache 2.2.x.
     

Share This Page