Error 413: Request Entity Too Large

Re: Error 413: Request Entity Too Large

Martin Dougiamas -
回帖数:6
Core developers的头像 Documentation writers的头像 Moodle HQ的头像 Particularly helpful Moodlers的头像 Plugin developers的头像 Testers的头像
Perhaps this is helpful: http://moodle.org/doc/?frame=install.html&sub=webserver

LimitRequestBody 0
php_value upload_max_filesize 2M
php_value post_max_size 2M
回复Martin Dougiamas

Re: Error 413: Request Entity Too Large

Howard Miller -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像
Errr....

this is probably a stupid question....

What is php_value.... all about. This isn't an Apache directive is it? I'm confused (again).
回复Howard Miller

Re: Error 413: Request Entity Too Large

Martin Dougiamas -
Core developers的头像 Documentation writers的头像 Moodle HQ的头像 Particularly helpful Moodlers的头像 Plugin developers的头像 Testers的头像
Yes, it's an Apache directive (you put it in httpd.conf or a .htaccess file)
回复Martin Dougiamas

Re: Error 413: Request Entity Too Large

Howard Miller -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像

Ho hum … ..

Put those directives in the "Directory" bit for Moodle and it made no difference whatsoever.

I finally thought to check in the Apache error log, and it says that the files is bigger than the "configured limit of 524288". I wonder what is setting that limit?

Any other ideas?

Oh … yes I did restart Apache 眨眼

回复Martin Dougiamas

Re: Error 413: Request Entity Too Large

Tom Ainscough -
I don't have a lot of server space for uploads. In fact, I will probably only have students upload their pictures.

Instead of 2M, will htaccess accept something as low as:

php_value upload_max_filesize 75K
php_value post_max_size 75K

That should be more than big enough for a 100x100 jpeg picture and/or text posts.

Will moodle automatically update changes made here to the "Max size:" notices?
回复Tom Ainscough

Re: Error 413: Request Entity Too Large

Martin Dougiamas -
Core developers的头像 Documentation writers的头像 Moodle HQ的头像 Particularly helpful Moodlers的头像 Plugin developers的头像 Testers的头像
Yes, the notice is updated to reflect the real current limits.

Note, though, that user images are automatically scaled/cropped down to 100x100, and usually end up being about 5k on disk, regardless of how big the upload was.

This doesn't help forum attachments or assignments though, for which you would need to reduce the limits as you've described.
回复Martin Dougiamas

Re: Error 413: Request Entity Too Large

Howard Miller -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像

Interesting … . I am getting the messag that the maximum size is 2M, but it patently is not.

Haven't had time to investigate this further, but it looks like there is something other than your recommended settings that effects this. Will get to the bottom of it (soon I hope)!!!