kapil sharma
kapil sharma

Reputation: 21

500 Internal Server Error coming when large amount of data is POST to a php file around more than 1 mb

Can anyone explain me why 500 Internal Server Error coming when large amount of data is POST to a php file and the data is around more than 1 mb?

Upvotes: 2

Views: 5346

Answers (1)

Kerri Shotts
Kerri Shotts

Reputation: 2372

My best guess is that the file is exceeding your configured maximum file size. See http://php.net/manual/en/features.file-upload.php for various discussion and solutions for throwing a prettier error message.

As to increasing those limits, look at "post_max_size" and "upload_max_size" in your .ini file. You'll also likely need to extend the execution time of the script, via "max_input_time" and "max_execution_time".

You can set these in your .ini, or in code as well. See http://blogs.sitepoint.com/upload-large-files-in-php/ for more info.

Upvotes: 2

Related Questions