How to modify the file size limit for PHP + Apache uploads

Source: Internet
Author: User
How to modify the file size limit for PHP + Apache uploads
How can I modify the size limit of uploaded files in php and apache? That is, to modify the restrictions on php file upload. For more information, see.

During program migration, it is found that files larger than 2 MB cannot be uploaded. First, check Localsetting. php file. this is the configuration file, with the following fields: $ wgUploadSizeWarning = 20000000;, but soon this is only a warning message.

If you choose to ignore all messages in the wiki, the file size cannot exceed 2 MB.

After further troubleshooting, we found that php restricts the file upload size.

For specific configuration files, see/usr/local/php/lib/php. ini.

Note that the configuration file in the/etc directory has actually become invalid because the original rpm packages such as php and apache are uninstalled and manually installed through the source code.

After modifying php. ini, restart the apache service,/usr/share/apache/bin/apachetcl restart, and upload the file again.

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.