apache2 - php5 file upload and post max size

  1. Create a php file with <?php phpinfo(); ?> and open it with your browser.
  2. Look for Loaded Configuration File (this shows the actual conf. file in use) and edit upload_max_filesize and set post_max_size to the same value (or make it 0 to disable limit) in that file in root mode.
  3. Execute: sudo service apache2 restart

I had the same problem. I changed these values in these files and now it's working:

➜find /etc -name 'php.ini'
/etc/php5/cli/php.ini
/etc/php5/cgi/php.ini
/etc/php5/apache2/php.ini
/etc/php5/embed/php.ini
/etc/php5/fpm/php.ini

You must set php settings for php "scripts", not only for Apache.