Increase the maximum file size upload in PHP

Sometimes you need to increase the default 2 megabyte maximum upload file size.

php_upload_max_filesize

The maximum size you can upload to a server using PHP is defined by 2 values:

  • Upload max file size: upload_max_filesize
  • Post max size: post_max_size

That’s why you have to make sure both options in php.ini have the correct values:

upload_max_filesize = 32M
post_max_size = 32M

You might also like

Increase the phpMyAdmin session timeout
Edit your config.inc.php file (in my Ubuntu 12.04 it was located at /etc/phpmyadmin/config.inc.php) and...

Increase the phpMyAdmin session timeout
Edit your config.inc.php file (in my Ubuntu 12.04 it was located at /etc/phpmyadmin/config.inc.php) and...

Fix “avrdude: stk500_recv(): programmer is not responding” in Mac OS X Mavericks 10.9 – Arduino
If you get this error while trying to upload an sketch with Arduino IDE in Mac OS X Mavericks 10.9:avrdude:...

Fix locale problems in Raspbian
If you get errors like this while running commands on your Raspbian:perl: warning: Setting locale...

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.