Default php settings do not allow uploads for files larger than 2 MB.
For larger file uploads, you need to edit following php.ini settings
* file_uploads
* upload_max_filesize
* max_input_time
* memory_limit
* max_execution_time
* post_max_size
upload_max_filesize and post_max_size
upload_max_filesize is the maximum file size that can be uploaded with php script.
post_max_size should be larger than upload_max_filesize as files are uploaded with POST method.
max_execution_time and max_input_time
max_input_time is the time script accept file inputs. You should put a height value for this.
max_execution_time is the maximum time upload script is allowed to execute, it should be larger than max_input_time
memory_limit
When the PHP engine is handling an incoming POST it needs to keep some of the incoming data in memory. So you should put a height value for this.
NOTE
Your server will only able to allocate memory for your script if it is available. If you are using shared server, chances are other sites too using memory and CPU resources. So there is no guarantee that your site/script will able to get the memory you set in the php.ini
If you are on a loaded shared server, you may face problems when uploading large files.
Change php.ini settings on shared hosting
Bookmarks