[PHP] file upload size limit for Nginx and PHP. _ PHP Tutorial

Source: Internet
Author: User
[PHP] file upload size limit for Nginx and PHP ,. [PHP] the file upload size limit for Nginx and PHP. modify the file upload size limit for three [PHP] Nginx and PHP files in the PHP configuration file by @ www. chenwei. ws1,

----------------------------------------------------------------------- @ Black eye poet www. chenwei. ws

1. modify three items in the PHP configuration file: vim/usr/local/php/etc/php. ini

(1) post_max_size = 50 M # maximum POST data acceptable to PHP

(2) upload_max_filesize = 50 M # maximum value allowed for file Upload

(3) max_execution_time = 300 # Maximum execution time of each script, in seconds (0 is not limited, it is not recommended to set 0)

2. modify the Nginx configuration file vim/usr/local/nginx/conf/nginx. conf. (if you forget the specific location of the configuration file, you can use locate nginx. conf to find it)

(1) client_max_body_size 50 m # maximum client Upload size 50 M

3. restart PHP:/etc/init. d/php-fpm restart

4. restart Nginx smoothly:/usr/local/nginx/sbin/nginx-s reload

Bytes ----------------------------------------------------------------------------------------------------




Modified, ----------------------------------------------------------------------- @ www. chenwei. ws 1. modify three items in the PHP configuration file...

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.