系统配置: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 邮件 附件