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

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

by David Paige -
Number of replies: 1

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