Php+apache solve the problem of uploading files too big

Source: Internet
Author: User

Php+apache solve the problem of uploading files too big Blog Category:
    • Php
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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.