Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: PHP variables that affect large file uploads  (Read 1783 times)

0 Members and 1 Guest are viewing this topic.

lathu_official

  • Guest
PHP variables that affect large file uploads
« on: January 21, 2014, 09:42:41 pm »
Following are the major PHP variable that would actually affect or hinder a large file upload. Edit the following in your local "php.ini" file.
 
* file_uploads(default is 1)
This enables/disables uploads completely. Make sure this is left "On".
 
* max_file_uploads(default is 20)
The maximum number of simultaneous uploads allowed at the same time.
 
* upload_max_filesize(default is 2M)
This is the sum of size of all the files that you are uploading via your PHP script.
 
* post_max_size(default is 8M)
This is the size of all data uploaded via a form(that is using POST).
 
* memory_limit(default is 128M)
This specifies the amount of memory reserved/used/available to a PHP script. Multiple instances of the same script will gradually take up all the memory, so make sure that the server doesn't crash.
Note that to have no memory limit, set this directive to -1.
 
* max_execution_time(default is 30)
This defines the maximum time in seconds of a PHP script(before it is terminated by the parser).
 
* max_input_time(default is -1)
This is the maximum amount of time a script should be accept input.

Note:

Add these to your local/global php.ini file, only if the webserver is running as CGI(suphp/suexec).
Add these to your .htaccess file, if the webserver is running as Apache/DSO.


-------------
Thanks.