开发者

IIS 7 & php big files upload problems

开发者 https://www.devze.com 2023-04-09 19:59 出处:网络
I\'ve been trying to upload some avi files by using several methods. First I\'ve tried using ADOBE\'s ADDT \"UPLOAD FILE\" to upload *.avi files, everything was ok, until I\'ve tried t开发者_如何学运维

I've been trying to upload some avi files by using several methods. First I've tried using ADOBE's ADDT "UPLOAD FILE" to upload *.avi files, everything was ok, until I've tried t开发者_如何学运维o upload a 131.5M video. When the size of the video is less than 40M, there's no problem, but when the video is bigger is where the problem starts. So tried different methods, jquery plugins, etc, with the same result. The server in which the movies should upload is running under IIS7. Making some search over the internet, I've found that the php.ini should be changed, so I have the following related values changed: max_file_uploads:20 max_input_time:240 memory_limit:256M post_max_size:256M upload_max_filesize:256M

Also in the SNAPIN of IIS under "REQUEST FILTERING" I've changed the value to 300000000 (300M). I think it has something to do with the time the upload is taking, because sometimes I can see in the temp folder a parcial upload of something between 25 and 47M I don't think that the php upload scripts are the problem, but something on the server side.


I finally discoverd which was the problem. In php.ini was the "*max_file_uploads*". First, I double it's value, from 20 to 40, which gave me 40 minutes timeout for an upload. Then I put in 200 which gave all the time needed to complete a 131.5 MB avi upload. After finding this (I was moving all the related parameters to see what would happen if...) I decided to check on php.net to see what was the official definition for "*max_file_uploads*" which is: "The maximum number of files allowed to be uploaded simultaneously. Starting with PHP 5.3.4, upload fields left blank on submission do not count towards this limit.". I'm completely confused why this worked, but my php.ini values are now this:

    max_file_uploads:200
    max_input_time:14400
    memory_limit:1.01G
    post_max_size:1G
    upload_max_filesize:999M

Beside, moved in the IIS in Request Filtering in the IIS section of the server (using IIS 7 manager), the value for max allowed content length to 1GB. Want to thank Alykhalid for the time and advices.


Did you increase the value of the max_input_time, what is the new value? Also try to increase the value of the CGI Time Out. Also look at this blog post for PHP time out issues.

0

精彩评论

暂无评论...
验证码 换一张
取 消