00 Votes

PHP: No Upload of large Files possible although upload_max_filesize and post_max_size are adjusted

Question by Guest | 2015-06-18 at 16:03

On my website, I would like to allow my users to upload files with a maximum size of 10 MB. Therefore, I have changed the values of "upload_max_filesize" and "post_max_size" to "10M" within my PHP.INI. Before, there was a limit of only 2 MB defined here.

Unfortunately, also with the new settings, the file upload is not working properly. I have tried to upload a 7 MB file, but the PHP script always aborts before finishing the upload.

Does someone have any idea?

ReplyPositiveNegative
0Best Answer0 Votes

First of all, it is important to restart Apache/PHP on your server. Only after a restart, the changes from PHP.INI will be adopted.

Next, you should also have a look at the variables "memory_limit", "max_input_time" and "max_execution_time". This variables are determining how many memory can be used by a script and how long a script may run on your server at the maximum. This variables have to fit the values from "upload_max_filesize" and "post_max_size", because otherwise the script cannot handle the large upload or the script stops before reaching the time necessary for uploading the data.

For more information, have a look at the tutorial of how to upload large files.
2015-06-18 at 17:28

ReplyPositive Negative
Reply

Related Topics

PHP: Upload of large Files

Tutorial | 0 Comments

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own article on askingbox.com. That’s how it’s done.