Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've installed from the official repos the LAMP server.
Into the file /etc/php5/apache2/php.ini i've changed post_max_size = 8M to post_max_size = 32M and upload_max_filesize = 2M to upload_max_filesize = 16M.
After that i've restarted the apache2 server and also the notebook but when i launch the phpinfo i got the 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?
thanks in advance!

share|improve this question
  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
share|improve this answer

I had same problem. I changed these valuse in these files and it's working:

➜find /etc -name 'php.ini'

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

share|improve this answer

I had the same problem and none of the solutions worked but this superb solution did.

  1. create a php file with <? phpinfo(); ?>

  2. Look for "Scan this dir for additional .ini files".

  3. Go to the above directory and create user.ini file like:-
post_max_size = 1500M
upload_max_filesize = 1500M
  1. Restart Apache sudo service apache2 restart
  2. Reload the phpinfo(); file. You will thanks me :)
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.