Recently contacted the IIS server, when using PHP to upload large files, encountered some problems. Through the review of online information to summarize, I hope to help you.
The first step is to check the configuration of PHP.
Open the php.ini configuration file1.file_uploads
set to on to allow uploading of files over HTTP
2.upload_tmp_dir
The directory used for temporary storage when the file is uploaded to the server, and if not specified, the default temporary folder (my machine is/tmp) is used.
3.upload_max_filesize
the maximum size allowed for the upload file, which defaults to 2M.
4.post_max_size
The maximum number of post data that PHP can receive (including the sum of all the values in the form), by default, 8M.
5.memory_limit
The maximum amount of memory per PHP, which is larger than the file size allowed to upload.
6.max_execution_time
The maximum time (in seconds) that each PHP runs, by default, 30 seconds.
7.max_input_time
The maximum time, in seconds, that PHP parses post/get data by default of 60 seconds. after confirming that the above configuration is available, it is essential to ensure that the PHP configuration is not a problem. At this time should not upload about 28M or more files. (Error Tip: 404 Page Not found)
Step Two: Modify IIS server FastCgi mode to run PHP upload file size limitOpen the system disk to find the C:\Windows\System32\inetsrv\config\schema directory, the directory has a iis_schema.xml, right-click Open File, Ctrl+f, and then enter ""add DefaultValue a few 0. If the prompt does not have permission, to the file's "properties" to remove the read-only, if prompted you do not have permission, on the point of advanced, add TrustedInstaller, and then edit there to change the permissions of all users to "full control." It 's a normal place to be here. If there are any further questions to continue.
Step Three: Continue to modify the configuration of the php.ini. (If prompted 500 internal server error, such as problems)log_errors = Offdisplay_errors = onerror_reporting = e_all & ~e_notice Reference:
Reference 1| reference 2
Php+iis Uploading large files