Windows iis+php solve large file upload 500 wrong problem

Source: Internet
Author: User

Linux changed to iis+php, upload more than 2M out of 500 wrong, changed the php.ini in the upload_max_filesize also not, and finally resolved as follows:

First step: Modify the php.ini upload size limit

(for example, above 500M files of the size)
Look for the following options and modify
File_uploads = on; open File upload option
upload_max_filesize = 500M; upload file limit
If you want to upload a larger file, only the above two is not enough, you must increase the server cache limit, the maximum execution time of the script is longer, add the following content, PHP upload is no problem
Post_max_size = 500M;p ost Upper
max_execution_time = 1800; Maximum execution time of each script, in seconds script maximum execution times
max_input_time = 1800; Maximum amount of time each script may spend parsing request data
Memory_limit = 128M; Maximum amount of memories a script may consume (128MB) memory limit

Step Two: Then modify the upload limit for IIS

1. Open Internet Information Services (IIS) Manager;
2, close the IIS service;
3. Double-click on "Your site" → Double-click on "Request Filter" in the pane of the right pane → "Edit feature settings" in the left-hand panel → Modify the "Maximum allowed content length" under "Request Limit", the default is 30M, arbitrarily change the size, I changed to 300M, click "OK";
4, restart IIS, and then upload a try, 50M, 90M can be.

Windows iis+php solve large file upload 500 wrong problem

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.