ID #1048

PHP errors: Premature end of script headers ...

What does the 'premature end of script headers' error mean?
99% of the time, this is caused by improper permission settings. Make sure you have the proper permissions set on your script (CHMOD 755).
You should also make sure that you are using a text-only editor such as Notepad or UltraEdit to edit your scripts (on a PC) or SimpleText or BBEdit (on a Mac).

Also be sure to also upload your scripts in ASCII and not binary. Failure to do so will result in your files not executing properly.

OR

PHP is loaded as a CGI in Apache and is causing problems with PERL - specially if accessing the same files (such as server log files)

OR

PHP script your running needs a lot of RAM, especially using CGI/Apache.
Try to raise your memory in php.ini

OR

PHP version: 4.1.0
PHP Bug Type: Apache2 related
Bug description: Premature end of script headers

Error description:
Many php scripts that works good with apache2 and php 4.0.6 doesn't work
now with apache2 and 4.1.0.

Solution: UPGRADE to newer version greater than 4.2.2!

Tags: PHP

Related entries:

You can comment this FAQ