Php - Bulk post 500 Internal Apache Server Error

I have a script that sends only a lot of data in json format by mail.

Up to 10 MB (data is placed in a flat file) data script works fine if the download is higher, I get from an internal Apache 500 server error.

I looked into the Apache log file, I get

[Wed Jan 19 17:26:41 2011] [error] [client ip] Premature end of script headers: index.php [Wed Jan 19 17:26:41 2011] [debug] mod_deflate.c(615): [client ip] Zlib: Compressed 632 to 385 : URL /index.php 

Do you have any ideas?

Bye

+1
source share
1 answer

Premature end of script headers

This message means that the PHP script died before outputting any type of content in apache. If you have activated the ob_ * functions, it could be any error on your PHP script or timeout, check the set-time-limit parameter in PHP for timeouts.

Also check that exception handling displays the correct content type if you want to display an error message.

To check all the parameters that may have an effect, you should check the timeout parameters and size limits. Here are some of them:

Apache:

  • LimitRequestBody

PHP:

  • post_max_size
  • upload_max_filesize
  • max_input_time
  • max_execution_time
  • and possibly memory_limit as well
+4
source

All Articles