Max file size not working??

Max file size not working??

by Allison Thompson -
Number of replies: 9

Hi there - we just implemented a Moodle 2.2 server.  We still have our Moodle 1.9 server in production so I'm trying to compare the two.

On my Moodle 2.2 server - this is the setting in my php.ini file:  upload_max_filesize = 128M (which is the same on my Moodle 1.9) - and the ; has been removed from the front of the line.

My site policy for max upload size is set to server limit.

As a user, when I go to my course on my Moodle 2.2 server > settings my maximum upload size - the highest choice is only 8M.  On my Moodle 1.9 server I can choose up to 128M.

Not sure what I'm missing or where to look from here?

Average of ratings: -
In reply to Allison Thompson

Re: Max file size not working??

by ben reynolds -

Hi Allison,

Here's the relevant documentation http://docs.moodle.org/22/en/File_upload_size

In reply to ben reynolds

Re: Max file size not working??

by Allison Thompson -

Thank you for that link.  I did find that eventually and that's where I learned about the upload size - but didn't notice the max post.  Thank you!

In reply to Allison Thompson

Re: Max file size not working??

by imketu p -

i am using 2.2 and i had a same problem and i have solved it, now i can upload up to 500mb data in scorm.

update few values in   xampp\php\php.ini

max_execution_time = 600
max_input_time=600
memory_limit = 500M
post_max_size = 500M
upload_max_filesize = 500M

add below line in to xampp\apache\conf\ httpd.conf

LimitRequestBody 536870912 

536870912 for 512mb 

Restart Apache.

i hope this will help.

Thanks

In reply to Allison Thompson

Re: Max file size not working??

by Mr. Marc -

So why is it that the error message when the file size is 15.6 meg as below, and we dont get the message when the file size is 15.3 meg.

ERROR: Invalid JSON string

Request Entity Too Large
The requested resource/moodle/repository/repository_ajax.php
does not allow request data with POST requests, or the amount of data provided in
the request exceeds the capacity limit.

Apache/2.2.3 (CentOS) Server at xxxxx.xxxxx.edu Port 443

{"error":"The uploaded file may exceed max_post_size directive in php.ini."}

CONFIGURATION

https://xxxx.xxxxx.edu/moodle/admin/phpinfo.php  says

post_max_size        17825792    17825792

upload_max_filesize    17825792    17825792


all of the .htaccess are set to

LimitRequestBody 17825792
php_value upload_max_filesize 17825792
php_value post_max_size 17825792

php.ini are set to

upload_max_filesize = 17825792
post_max_size = 17825792

and the php.conf file is set to

LimitRequestBody 17825792

In reply to Mr. Marc

Re: Max file size not working??

by Danny Wahl -

Because you already have 15.6 of your 16M dedicated to the file alone. you only have 400Kb to dedicate to the POST Data - so you're exhausting your memory.

 

Your post max file size shoud be greater than your upload max file size and your memory limit should be greater than post max file size.

In reply to Danny Wahl

Re: Max file size not working??

by Séverin TERRIER -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Interesting/useful information, that should be put in docs wink