Results 1 to 5 of 5

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

  1. #1
    Registered Member
    Join Date
    Jul 2005
    Posts
    93

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

    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.
    Last edited by hm2k; 11-17-2009 at 06:07 AM.

  2. #2
    Registered Member
    Join Date
    Jul 2005
    Posts
    93

    Default

    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.
    Last edited by hm2k; 11-17-2009 at 06:20 AM.

  3. #3
    Registered Member
    Join Date
    Oct 2006
    Location
    Penang, Malaysia
    Posts
    56

    Default

    What is the PHP version and Zend Optimizer version for your box?

  4. #4
    Registered Member stugster's Avatar
    Join Date
    Apr 2002
    Location
    Edinburgh, UK
    Posts
    78
    cPanel/WHM Access Level

    Root Administrator

    Default

    Why is this not on by default?

  5. #5
    Registered Member cPanel Partner NOC Badge txspaderz's Avatar
    Join Date
    Jun 2008
    Location
    Houston
    Posts
    37
    cPanel/WHM Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by hm2k View Post
    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.
    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.

Similar Threads

  1. Replies: 5
    Last Post: 07-26-2011, 12:50 AM
  2. Premature end of script headers
    By camposomar in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 10-02-2009, 04:37 PM
  3. all php not working giving Premature end of script headers:
    By big in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 09-21-2007, 09:36 PM
  4. how to debug PHP script with "Premature end of script headers"
    By SoftDux in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 06-19-2007, 08:57 AM
  5. Error: Premature end of script headers
    By kaizenwerks in forum Database Discussions
    Replies: 2
    Last Post: 01-30-2006, 02:02 PM
bargain