The uploaded file exceeds the upload_max_filesize directive in php.ini.

The uploaded file exceeds the upload_max_filesize directive in php.ini.

by Mike Carderelli -
Number of replies: 2

We have migrated to 2.5 from 1.9 and have been able to move most classes over using Backup and Restore. There are a couple of classes whose backup files are over 2GB, and 2.5 doesn't seem to allow files that large to be restored.


We have edited the php.ini file to all uploads of 20000m, but that hasn't worked. Can we increase the the limit to allow 2.5 to take restore files in excess of 6GB?


Server is UBUNTU


Thank you!

Average of ratings: -
In reply to Mike Carderelli

Re: The uploaded file exceeds the upload_max_filesize directive in php.ini.

by Ken Task -
Picture of Particularly helpful Moodlers

There are two parameters in PHP related to uploading files.  You have only one set.

The other is Maximum HTTP POST size.

In php.ini look for post_max_size = and make it same as the other parameter.

Comment:  That's large!!!  To be expected.

What you might consider doing is setting up file system repository in a single course accessible by system admins only.   The file system repo is a folder in /moodledata/responsitory/[largecoursebackups].   You manually create the folder 'largecoursebackups'.

Then use scp or FTP or whatever to get those large course backups to that directory:

/moodledata/responsitory/largecoursebackups/

Then, in the course using that file system repo, one can restore those backups to other categories in Moodle.

Other things one might have to tweak ... max_allowed_packets in MySQL. Depending upon what's in those backups.

'spirit of sharing', Ken


In reply to Mike Carderelli

Re: The uploaded file exceeds the upload_max_filesize directive in php.ini.

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

You need to also set the post_max_size and make sure that you restart apache after you change the settings.