1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Maximum file size when uploading with PHP
The limit is 300 MB for uploading files. Please also take note that we restrict PHP scripts for their execution time. For further details click here.
Certain PHP scripts will have an automatic limit set at a lower value by means of their HTML form and the MAX_UPLOAD_SIZE setting.
If you encounter upload restrictions, check if this is the case. For example, this limits the file being uploaded to 2097152 bytes (2MB):
<code>INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" VALUE="2097152" </code>So you'll need to remove this from your PHP script in order to exceed this value.
The 10 second limit isn't a real-time limit but a limit to CPU time. That is to say that only the CPU usage time is counted. So for example, when you upload a 40 MB file, the time counted is the CPU time that it has taken to write the file to the temporary folder. Then the time will be also be counted if you copy it somewhere else.
Note that the values for upload_tmp_dir and session.save_path can be modified by means of the .htaccess file.