duanci9305 2013-03-25 12:56
浏览 231

使用php在Windows服务器上上传文件时出现问题

We are facing an issue in file uploading on windows server running php. Bigger files are not uploading to the server. The site is hosted in a windows 2008 server and the webserver is IIS 7.

Sometimes it is possible to upload 22MB files, but sometimes the upload fails for 10 MB file. There is no error messages in the log files.

We have set very higher values in PHP.ini files.

max_execution_time 1800
max_input_time  1800
memory_limit       = 5000M
upload_max_filesize = 60M
max_file_uploads = 40
post_max_size  = 400

We also tried to increase the IIS upload limit by adding the values in web.conf file. It's also not solved the issue.

maxRequestLength="204800"
requestLengthDiskThreshold="204800"
executionTimeout="3600"
maxAllowedContentLength="204800000"

http://support.myeasyprojects.net/KB/a53/uploading-large-files-times-out.aspx

We are in the middle of a very confusing issue. Can anyone help us out on this?

  • 写回答

2条回答 默认 最新

  • douxuqiao6394 2013-03-25 12:59
    关注

    post_max_size should match upload_max_filesize because files are sent with POST.

    Memory limit is very high, do you really need all that memory? 256M should be enough.

    My suggested configuration:

    memory_limit       = 256M
    upload_max_filesize = 64M
    post_max_size  = 64M
    
    评论

报告相同问题?

悬赏问题

  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?
  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛