iis+php upload file size limit and upload time limit, IIS7 and iis8 upload file size limit and upload time limit

Source: Internet
Author: User
Tags form post

first, the configuration on this side of IIS.

One: Click "Configuration Editor" under Site "admin". Two: Set the upload time-out limit. Click the drop-down menu section (S) and select System.web>httpruntime to set the value of Executiontimeout to 00:30:00 (that is, 30 minutes) Three: Set the upload file size limit.

Click the drop-down menu section (S) and select System.webserver>security>requestfiltering

Expand RequestLimits, set the value of maxAllowedContentLength to 102400000 (that is, 100m)

Note: This modification can take effect directly, without restarting IIS or the server.

Four: You can also directly in the site root directory to build a Web. config file, using this method can directly omit the first 5 steps, the Web. config content is as follows

<? XML version="1.0" encoding="UTF-8"?>

<configuration>

<system.webServer>

<defaultDocument>

<files>

<clear />

<add value="index.htm" />

<add value="index.html" />

<add value="index.php" />

<add value="iisstart.htm" />

<add value="default.aspx" />

</files>

</defaultDocument>

<staticContent>

<mimemap fileextension=". mp4" mimeType="Application/octet-stream" />

</staticContent>

<security>

<requestFiltering>

<requestlimits maxallowedcontentlength="202400000" />

</requestFiltering>

</security>

</system.webServer>

<system.web>

executiontimeout="1850" />

</system.web>

</configuration>

in order to set php.ini Here's the configuration. Open php.ini, first find file_uploads = ON, whether to allow the switch to upload files over HTTP. The default is on is open Upload_tmp_dir, the file is uploaded to the server where temporary files are stored, if not specified will be used the system default temporary folder Upload_max_filesize = 8m; Wang Wen Business, that is, allow the maximum size of the upload file. The default is 2mpost_max_size = 8m; The maximum value that can be received by the form Post to PHP, including all values in the form. The default is 8M generally, after setting the above four parameters, uploading <=8m files is not a problem, in the network normal situation. However, if you want to upload a large volume of >8m files, only set the above four items will certainly be able to pass. Further configure 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, each PHP page ate the maximum memory, the default 8M to modify the above parameters, in the normal circumstances allowed by the network, you can upload a large volume of files max_execution_time = 600max_input_time = 600memory_ Limit = 32mfile_uploads = Onupload_tmp_dir =/tmpupload_max_filesize = 32mpost_max_size = 32m

iis+php upload file size limit and upload time limit, IIS7 and iis8 upload file size limit and upload time limit

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.