Php+apache solve the problem of uploading files too big
Blog Category:
Phpapache upload files with Php+apache, because the file is too large, easy to cause upload failure, the solution:
Modify the php.ini:
Upload_max_filesize 2m is the maximum amount of file size allowed to upload. The default is 2M, the size can be based on your
needs to be modified.
Post_max_size 20m refers to the maximum value that can be received by a form post to PHP, including all
Value. The default is 8M, size can be modified according to your needs
Description
Generally, set up the above four parameters, in the network normal situation, upload <=8m files is not a problem
However, if you want to upload a large volume of >8m files, only set the above four items will certainly be able to pass.
Unless your network really has a 100m/s upload speed, you still have to set the following parameters.
Max_execution_time 600 Maximum time value per php page (seconds), default 30 seconds
Max_input_time 600 maximum time per PHP page to receive data, default 60 seconds
Memory_limit 8m max memory eaten per PHP page, default 8M
Httpd.conf:
Limitrequestbody//Because I upload a picture sheet max 4M, upload 10 photos so I set the parameters: 40000000 (40M)
Limitrequestbody 524288 in the 524288 (=512x1024), such as 5M (=5x1024x1024)
PHP limit upload file size, file upload will not appear above problems, upload does not respond, upload the reality of the page can not be realistic will be resolved!