I have tried everything I can think of to save the changes (upload_max_filesize) to the php.ini file on amazon linux 2.
I’ve tried:
sudo systemctl restart php-fpm
sudo systemctl restart httpd
Also tried the ini_set function
ini_set('upload_max_filesize', '20M');
Also tried using .htaccess file
php_value post_max_size 20M
php_value upload_max_filesize 20M
Nothing seems to save the changes. What I’m I missing?
PIECE OF ADVICE
Check PHP version and open its PHP.ini file. I installed many PHP versions and edited the wrong PHP.ini many times
TROUBLESHOOTING
Create a Page called phpinfo.php with the following inside:
<?php
phpinfo();
?>
Access it to check the Master Values and Local Values. You’ll also get the php.ini configuration file location and edit it instead of ini_set
. When the Master Values are modified, it’s applicable to all apps running the same PHP version.