Apache: Premature End of Script Headers

In Apache, Premature End of Script Headers error is a common error and normally you will not have any way to know what is the actual error.

The method of error is like below,

Premature end of script headers: /home/mickgenie/public_html/index.php

With this error, it is because the server is expecting a complete set of HTTP header, but it doesn’t get it.

From my experience, this could be caused by at least 4 of the following problem,
1. With 32 bits server, the suPHP’s Logs file reached 2GB. As the largest file size per file from 32 bits server is 2GB only, you should check the suphp_log as path below,

2. PHP version, if you recently upgrade your PHP version, it could be one of the possibility of the problem.

3. The RLimitCPU and RLimitMEM directives in the httpd.conf file as the resource might killed.

4. File permission, as CGI script required user and group permission set, if you do not have proper permission, you will get this error.

Published by

Mick Genie

Mick Genie is the founder of MickGenie.com and working at ExaBytes Network Sdn Bhd and WPWebHost web host company. He is expertise in Windows and Linux environment especially web hosting related information, tips and trick as well as the IT Information.