Increase upload_max_filesize and post_max_size to 200M

March 23, 2017 312 views
Apache PHP Ubuntu

Hy i want to increase uploadmaxfilesize and postmaxsize to 200M. I've tried to set in php.ini (etc/php5/apache2/php.ini) this two values, i've restart apache with the command sudo service apache2 restart, but i don't upload file exceed 8M, some suggestion?

Thanks
Mike

2 Answers

@michelenfl

If the standard location for php.ini isn't working, one quick way to find which php.ini is being loaded is by creating a temporary file named info.php and within it, place:

<?php phpinfo();

Save and the browse to that file using your browser of choice. You'll want to modify the php.ini that is showing as Loaded Configuration File. For me, that's the sixth row from the top.

Once you've located the correct file, delete the info.php file, make the changes needed to php.ini and then restart Apache once again.

Have another answer? Share your knowledge.