最近在win2003 apache+php+fastcgi+mysql 开发环境下,上传图片时,遇到稍大的图片总是会遇到“HTTP error”,但是检查过php.ini发现文件大小限制post_max_size设置的没有问题,查看apache的logs 日志记录才显示了问题所在:
“mod_fcgid: HTTP request length 135567 (so far) exceeds MaxRequestLen (131072)”
原来是fastcgi模式下的设置问题,需要在配置文件.htaccess或者直接在apache的配置文件http.conf 中指明,如下:
<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcgi
FcgidConnectTimeout 20
# to get around upload errors when uploading images increase the MaxRequestLen size to 15MB
FcgidMaxRequestLen 15728640
</IfModule>
“mod_fcgid: HTTP request length 135567 (so far) exceeds MaxRequestLen (131072)”
原来是fastcgi模式下的设置问题,需要在配置文件.htaccess或者直接在apache的配置文件http.conf 中指明,如下:
<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcgi
FcgidConnectTimeout 20
# to get around upload errors when uploading images increase the MaxRequestLen size to 15MB
FcgidMaxRequestLen 15728640
</IfModule>