The file you tried to upload is too large for the server to process.

The file you tried to upload is too large for the server to process.

by manh vu thanh -
Number of replies: 4

Hello,

I have backed up my course about 370Mb,

today, I can't restore the course with a message ""The file you tried to upload is too large for the server to process."

Please help me.

Thanks

Average of ratings: -
In reply to manh vu thanh

Re: The file you tried to upload is too large for the server to process.

by Vickie Anderson -

Hi,

Any update on this. I am having this issue and I have updated my php.ini file. I get this error now with any file I try to upload, no matter the size.

Thanks,

Vickie

In reply to Vickie Anderson

Re: The file you tried to upload is too large for the server to process.

by David Paige -

Vickie, This is a very timely issue for me. Just today I imported a course into Moodle 3.2 that I exported from Moodle 2.5. The file was about 638 MB.

I had to make the following changes.  This is using php56 in Rhel7, so some of the files aren't in the normal locations:

/etc/opt/rh/rh-php56/php.ini

post_max_size = 1G

upload_max_fileszie = 1G

max_execution_time = 600

You do need to restart httpd, which in may case is

# systemctl restart httpd24-httpd

If you forget the restart, the settings won't be applied.

I also needed to update mariadb.  In the /etc/my.cnf.d/mysqld, I added this line:

max_allowed_packet = 100M

Save that and then restart mariadb.  It should would just as well for MySQL.

Post back if you are still having issues.

Average of ratings: Useful (2)
In reply to David Paige

Re: The file you tried to upload is too large for the server to process.

by John Jackson -

I'll just chime in here, after addressing the same issue on one of my servers after upgrading to PHP 7.

Those variables can be set in several different places, depending on how the server is configured. PHP.ini is one, .htaccess is another, and I learned on my server they are set in .user.ini

So the lesson here is, check with the documentation of your hosting company, or your local sys admin to find out the right place to edit these variables.

John