By default, you can upload files below 2M for larger file uploads to the following settings:
Open PHP.ini, first find
File_uploads = on; switch to allow uploading of files over HTTP. The default is on, which is open
Upload_tmp_dir; files uploaded to the server where temporary files are stored, if not specified, will use the system default temporary folder
Upload_max_filesize = 8m; Hope business, that is, the maximum size allowed to upload files. Default is 2M
Post_max_size = 8m; The maximum value that can be received by the form Post to PHP, including all values in the form. Default is 8M
After setting the above value, Win+r open the Run interface input services.msc Open the service restart Apache service (or other Server service name), the settings will take effect.
Generally, after setting the above four parameters, uploading <=8m files is not a problem, in the network normal situation.
However, if you want to upload a large volume of >8m files, only set the above four items will certainly be able to pass.
Further configure the following parameters
Max_execution_time = 600; maximum time value per php page (seconds), default 30 seconds
Max_input_time = 600; The maximum time required for each PHP page to receive data, default 60 seconds
Memory_limit = 8m; max memory consumed per PHP page, default 8M
After modifying the above parameters, it is possible to upload large volume files under normal conditions allowed by the network.
Max_execution_time = 600
Max_input_time = 600
Memory_limit = 32m
File_uploads = On
Upload_tmp_dir =/tmp
Upload_max_filesize = 32m
Post_max_size = 32m
Note: Make sure that the modified php.ini is not the one that needs to be modified. Verify that the settings are in effect you can view PHP configuration information in the browser input 127.0.0.1/phpinfo.php. For Appserv, modifying the two php.ini-dist and php.ini-recommanded files under X:\APPSERV\PHP5 is not valid. The real php.ini file is under C:\Windows.
PHP Large File Upload