文件上载尝试时error_log上的MaxRequestLen错误

时间:2012-08-16 21:46:43

标签: linux apache centos mod-fcgid fcgid

我在Media Temple的Apache服务器上使用PHP / MySQL设置。

当试图通过客户的管理部分上传大文件时(这种情况很常见,有100MB文件上传)我收到此错误:

[Thu Aug 16 14:30:38 2012] [warn] [client 64.46.17.53] mod_fcgid: HTTP request length 16785212 (so far) exceeds MaxRequestLen (16777216) 

在fcgid.conf文件中,我有以下一行:

FcgidMaxRequestLen 1073741824600

我也尝试将其改为

MaxRequestLen 1073741824600

无论如何,整个文件现在看起来像这样,当我重新启动apache时,配置中没有错误。

# This is the Apache server configuration file for providing FastCGI support
# via mod_fcgid
#
# Documentation is available at http://fastcgi.coremail.cn/doc.htm

LoadModule fcgid_module modules/mod_fcgid.so

<IfModule mod_fcgid.c>

<IfModule !mod_fastcgi.c>
    AddHandler fcgid-script fcg fcgi fpl
</IfModule>

  FcgidIPCDir /var/run/mod_fcgid/sock
  FcgidProcessTableFile /var/run/mod_fcgid/fcgid_shm

  FcgidIdleTimeout 600
  FcgidMaxRequestLen 1073741824600
  FcgidBusyTimeout 600
  FcgidProcessLifeTime 30
  MaxRequestLen 1073741824600
  FcgidMaxProcesses 20
  FcgidMaxProcessesPerClass 8
  FcgidMinProcessesPerClass 0
  FcgidConnectTimeout 600
  FcgidIOTimeout 600
  FcgidInitialEnv RAILS_ENV production
  FcgidIdleScanInterval 10

</IfModule>

我需要覆盖哪些其他值?我有SSH root访问权限,虽然对命令行输入非常不舒服。

2 个答案:

答案 0 :(得分:0)

我猜你的价值太高了。检查MediaTemple Wiki for that issue,它为您提供1Gb的配置。

答案 1 :(得分:0)

尽管PHP不在支持范围之内,但我可以为您提供有关编辑PHP的{mt}知识库文章http://kb.mediatemple.net/questions/137。我希望这会为你提供一些帮助。但是,我们总是在这里回答问题并指导您朝着正确的方向前进。如果您有任何其他问题,请随时与我们联系。我们通过聊天,电话和Twitter提供全天候服务。祝你有美好的一天!

Kat D. (mt)媒体寺 社交媒体团队

相关问题