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

hm2k

Well-Known Member
Jul 19, 2005
93
0
156
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:

hm2k

Well-Known Member
Jul 19, 2005
93
0
156
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:

txspaderz

Active Member
PartnerNOC
Jun 4, 2008
38
0
56
Houston
cPanel Access Level
DataCenter Provider
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.