当前位置: 主页 > 服务器技术 > Mail服务器 > WEB 在发送大于500K的附件的邮件时出错

WEB 在发送大于500K的附件的邮件时出错

时间:2009-9-17来源:互联网 点击:
系统配置:RH9+qmail+vpopmail+squilmail+apach2.0,在web页面发送大于500K的附件是出现错误提示:
Request entity too large!
The POST method does not allow the data transmitted, or the data volume exceeds the capacity limit. 
If you think this is a server error, please contact the webmaster

解决:

     This specifies a maximum size that uploaded files can be throughout the whole site. This setting is limited by the PHP setting upload_max_filesize and the 
Apache setting LimitRequestBody. In turn, maxbytes limits the range of sizes that can be chosen at course level or module level.



This is the message that appeared in a RH9.0 out-of-the-box moodle server...



I‘ve altered the PHP configuration file:

 /etc/php.ini .

     ; Maximum allowed size for uploaded files. 

     ; upload_max_filesize = 2M

     upload_max_filesize = 20M



- and Apache‘s configuration file:

/etc/httpd/conf/httpd.conf .

    # Limit Upload to 20Mb

    LimitRequestBody 20971520



but that‘s not enough! Even with these alterations it still appeared the message:

Request entity too large!

    The POST method does not allow the data transmitted, or the data volume exceeds the capacity limit.

     If you think this is a server error, please contact the webmaster Error 413



...

This is only solved after changing

 /etc/httpd/conf.d/php.conf

 <Files *.php>

    SetOutputFilter PHP

    SetInputFilter PHP

# LimitRequestBody 524288

    LimitRequestBody 20971520

 </Files>



that has a default of only 500Kb!!!
站长资讯网
. TAG: WEB 邮件 附件
推荐内容最近更新人气排行
关于我们 | 友情链接 | 网址推荐 | 常用资讯 | 网站地图 | RSS | 留言