Premature end of script headers

If you receive an Internal Server Error 500 and checking your log files displays "Premature end of script headers" errors this can occur for a couple reasons.

This can represent a permission issue. If using PHP be sure to set your .php files to 755 with our service.

Coding Issue: You have an extra space or carriage return in your coding after the closing of the ?php tag.

Your script has exceeded resource usage limits. This can occur if your script is using over 128MBs in a single process. After the 128MB the process is killed due to excessive resource usage which results in the internal server error and a premature end of script headers listing in the error logs. To prevent this from occurring you will want to optimize your coding to be more efficient and use less memory via optimization, reducing features, pruning databases, or upgrading your plan to a plan better suited to the high memory demands your account requires such as the semi-dedicated plan or higher.

  • 129 Users Found This Useful

Was this answer helpful?

Related Articles

PHP information

To view your current version of PHP you will create a php file, for example info.php, and place...

I am having problems with a script I wrote.

PHP suexec is running on all of our shared servers. If you are running code that is insecure or...

What is the Path to ImageMagick?

The path to ImageMagick is /usr/bin/

Could not connect to the MariaDB - MySQL database

You will want to verify you are using the correct database name, username and password.All...

How do I update my version of PHP?

PHP needs to be updated. What do I do?We make changing your version of PHP easy. Simply login to...