IIS 7 和php大文件上传问题

发布于 2024-12-07 19:55:56 字数 444 浏览 0 评论 0原文

我一直在尝试使用多种方法上传一些 avi 文件。 首先我尝试使用ADOBE的ADDT“上传文件”上传*.avi文件,一切正常,直到我尝试上传131.5M的视频。当视频大小小于40M时,没有问题,但是当视频更大时,问题就开始了。所以尝试了不同的方法,jquery插件等,得到了相同的结果。 上传电影的服务器在 IIS7 下运行。 在互联网上进行一些搜索,我发现应该更改 php.ini,因此我更改了以下相关值: 最大文件上传数:20 最大输入时间:240 内存限制:256M 帖子最大大小:256M upload_max_filesize:256M

另外,在 IIS 的 SNAPIN 中的“请求过滤”下,我已将该值更改为 300000000 (300M)。 我认为这与上传的时间有关,因为有时我可以在临时文件夹中看到部分上传的文件大小在 25 到 47M 之间 我不认为 php 上传脚本有问题,而是服务器端的问题。

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 to 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

忆伤 2024-12-14 19:55:56

我终于发现问题出在哪了。在 php.ini 中有“*max_file_uploads*”。首先,我将其值加倍,从 20 增加到 40,这给了我 40 分钟的上传超时时间。然后我输入 200,这给出了完成 131.5 MB avi 上传所需的所有时间。
找到这个之后(我正在移动所有相关参数以查看如果......会发生什么)我决定检查 php.net 以了解“*max_file_uploads*”的官方定义是什么,即:
允许同时上传的最大文件数。从 PHP 5.3.4 开始,提交时留空的上传字段不计入此限制。”。
我完全困惑为什么这有效,但我的 php.ini 值现在是这样的:

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

此外,在服务器的 IIS 部分的请求过滤中移入 IIS(使用 IIS 7 管理器),最大允许内容长度的值1GB。
感谢 Alykhalid 的时间和建议。

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.

情感失落者 2024-12-14 19:55:56

您是否增加了 max_input_time 的值,新值是多少?另请尝试增加 CGI 超时 的值。另请参阅 这篇博文针对的是 PHP 超时问题。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文