|
Oct 15
2009
|
|
File upload sizes are affected mainly by the below PHP settings.
file_uploads = On
This setting must be on. It allows running uploads through HTTP.
Ensure this value is on the value can be On/Off or 1/0 or true/false.
upload_max_filesize = 20M
This value limits the size of uploaded single file. Give it the value that you may require for your specific needs.
post_max_size = 40M
This value limits the size of all the uploaded content.
For example upload_max_filesize is for single file, if we upload 3 files simultaneously each 15mb total 45mb so it will exceed the post_max_size.
Remember post_max_size must be larger, roughly about 40% more of the upload_max_filesize.
max_execution_time = 30
Generally image uploading and manipulating with GD or Imagemagic consumes a lot of time and resources on your server. So processing larger files may exceed 30 seconds.
You can modify this to whatever your requirements may be. When a script execution time is exceeded by this limit, the server will stop the script or give a fatal error.
memory_limit = 128M
Generally image uploading and manipulation with GD or Imagemagic consumes a lot of time and resources (memory) on your server. When it exceeds this memory, the server stops executing the script, then we will see empty pages or no response from server or we get a fatal error.
Completed example, to increase 10Mb
upload_max_filesize = 10M ;
post_max_size = 20M ;
memory_limit = 128M
Copy the above settings into your php.ini and put it in your web root directory.
file_uploads = On
This setting must be on. It allows running uploads through HTTP.
Ensure this value is on the value can be On/Off or 1/0 or true/false.
upload_max_filesize = 20M
This value limits the size of uploaded single file. Give it the value that you may require for your specific needs.
post_max_size = 40M
This value limits the size of all the uploaded content.
For example upload_max_filesize is for single file, if we upload 3 files simultaneously each 15mb total 45mb so it will exceed the post_max_size.
Remember post_max_size must be larger, roughly about 40% more of the upload_max_filesize.
max_execution_time = 30
Generally image uploading and manipulating with GD or Imagemagic consumes a lot of time and resources on your server. So processing larger files may exceed 30 seconds.
You can modify this to whatever your requirements may be. When a script execution time is exceeded by this limit, the server will stop the script or give a fatal error.
memory_limit = 128M
Generally image uploading and manipulation with GD or Imagemagic consumes a lot of time and resources (memory) on your server. When it exceeds this memory, the server stops executing the script, then we will see empty pages or no response from server or we get a fatal error.
Completed example, to increase 10Mb
upload_max_filesize = 10M ;
post_max_size = 20M ;
memory_limit = 128M
Copy the above settings into your php.ini and put it in your web root directory.

