max upload size

Re: max upload size

by Timothy Takemoto -
Number of replies: 0
I had trouble with this too. There seem to be a lot of things said about this but I could not get them to work. Most course backups are going to be bigger than 2M, so this is something that one would like people to be able to manage easily. It is easy in fact but it took me a while to figure it out.

I could not find the "php user_max_filesize" that David Kelly refers to. I presume that this is a server setting but as far as I know there are only the two settings that Martin mentions in my php.ini.
I changed both of these.
php_value upload_max_filesize 50000000
php_value post_max_size 5000000
Also I do not have a "limitreqestbody" in either of the httpd.conf or php.ini.

Additionally, I cannot increase the size on the moodle site administrationb page since it is a dropdown menu with the maximum at 2M.

I am not sure what the neck because I do not know whether there is some setting internal to moodle (i.e. a variable called "maxbytes") or whether the maxbytes simply changes the values in php.ini.

However, I have solved this problem by downloading directly into the moodle data directory. I created a folder called "foldername" and this could be found in the following position.

moodledata/1/foldername

If you down load directly into moodle then there is no need to upload. Since it is likely to be backupfiles that are going to go over the limits, perhaps this should go in a FAC somewhere.

I have written a fac entry which I feel confident will not be approved (perhaps I should post it to the documents course?), so I append it here for users reference.

Restoring Large Files
Course backup files can become very large, far exceeding the limit ("maxbytes") set on files to be uploaded into Moodle site files.

Changing the maximum 'upload size' (click to see the explanation of how to do this in the FAQ) is one way around this, but it may not be a good idea to increase this limit to the sort of level required by large backup files.

A simpler method of getting around the maximum file size restriction is

1) If you are using the moodle server then simply download course files the moodledata directory (site files are in directory 1, course files are in subsequnetly numbered directories)

2) If you your Moodle server is remote then upload the file into the Moodledata directory using ftp. If you create a directory called "backup" in the moodle site files, then you can put things directly into it by ftp to
moodledata/1/backup
where moodledata is the directory containg moodle data for your moodle installation.

Reload your moodle browser to see the new uploaded contents.


******************************************************

Perhaps, for those teachers that want to be able to use the Moodle GUI it would be nice if there were a "100MB" or so option in the maxbytes dropdown menu?

PS
I had the idea that I needed to restart apache for the changes I had made to php.ini to take effect. This seems to be the case. HOWEVER, when I applied the changes by restarting apache, it could not restart. Now that I have change the two of these
php_value upload_max_filesize 50000000
php_value post_max_size 5000000
back to "2m" and now I can restart apache. Hmm.... this is strange, probably something stupid on my part. But anyway, perhaps the words "and restart apache" might go into the upload size fac. Perhaps not.

Tim

Timothy Takemoto