Ubuntu – apache2 – php5 file upload and post max size

Apache2PHP

I've installed from the official repos the LAMP server.
In the file /etc/php5/apache2/php.ini, I've changed:

post_max_size = 8M
upload_max_filesize = 2M

to

post_max_size = 32M
upload_max_filesize = 16M

After that, I've restarted the apache2 server and also the notebook but when I launch the phpinfo I got post_max_size set to 8MB. The only way to resolve this bug is to set the php_value ..... into an .htaccess but this is not what I want.

How can I resolve this?

Best Answer

  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
Related Question