apache+php upload File Size Limit modification method

Source: Internet
Author: User
Introduced under the Apache and PHP environment, modify the upload file size limit method, there is a need for friends reference.

In solving the PHP upload file size limit, not only to modify the PHP upload file size limit, in fact, Apache can also be modified.

System environment: CentOS 5.5

1, modify PHP file size limit Vi/etc/php.ini found: Max_execution_time = 30, this is the maximum time each script runs, in seconds, modified to: Max_execution_time = 150

Found: Max_input_time = 60, this is the time each script can consume, the unit is also the second, modified to: Max_input_time = 300

Found: Memory_limit = 128M, this is the maximum memory consumed by the script, change the value as required, modified to: Memory_limit = 256M

Found: Post_max_size = 8M, form submission maximum data is 8M, this item is not limited to upload a single file size, but for the entire form of submission data restrictions. The scope of the restriction includes all content submitted by the form. For example: When posting posts, posts title, content, attachments, etc., modified to: Post_max_size = 20M

Found: upload_max_filesize = 2M, upload file maximum license size, modified to: Upload_max_filesize = 10M

2, modify the Apache upload file size limit vi/etc/httpd/conf.d/php.conf limitrequestbody 524288 will 524288 (=512x1024) changed, such as 5M (=5x1024x1024) Upload will not appear above problems, upload does not respond, upload the reality of the page can not be realistic will be resolved!

  • Related Article

    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.