Premature end of script headers

The error message Premature end of script headers means that the PHP script stopped executing before it could send the HTTP headers to the web server. This can happen for a number of reasons, such as:

 

  • The script encountered an error and stopped executing.
  • The script was interrupted by a signal.
  • The script was running too long and the web server timed it out.
  • 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.
  • The max_execution_time directive in the PHP configuration file needs to be increased.
  • 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.

If you've tried all of the above steps and the error is still occurring, you may need to contact our support for assistance. We will be able to help you identify and resolve the issue.

 

  • 131 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...

What is the Path to ImageMagick?

The path to ImageMagick on Ultra Web Hosting is /usr/bin/. This means that you can access...

How to Disable XCache for a Domain

On many of our servers xcache is use as part of the php caching mechanism. If you are...

Error: SoftException in Application(dot)cpp:303 UID of script is small than min_uid

The error message "Error: SoftException in Application(dot)cpp:303 UID of script is small than...

When trying to connect to MariaDB or MySQL you receive error 2003 Cannot connect to MySQL on xxxxxx on port 3306 10060

The error 2003 "Cannot connect to MySQL on xxxxxx on port 3306 10060" means that the MySQL...