Gateway Timeout / File Upload: 500 Internal Server Error

Issue

Sometimes, you can face an issue by uploading files with the script and get the error below:

Gateway Timeout.

or

500 Internal Server Error.

or

Batch file upload failed Internal Server Error.

or

Allowed memory size of x bytes exhausted

or

With the "Single Step Form" you will receive the error message: The pictures.X failed to upload.

Solution

If you facing the issue above, as well as the file size limit, there is also a memory limit to consider. Several variables (from your php.ini file) need consideration…

max_execution_time =
memory_limit =
post_max_size =
upload_max_filesize =
max_input_time =

Exemple:

This configuration can allow you to upload 17MB file

max_execution_time = 120
memory_limit = 512M
post_max_size = 128M
upload_max_filesize = 64M
max_input_time = 240

Done.


Advanced Solutions (Rarely Used):

If the solution above doesn't solve the issue (that is very rare), you need to consider the settings below: