I've had a problem for a while now where I can't upload anything larger than 8 megabytes. I've narrowed it down that it's the actual php.ini file, which is not updating.
So far I've found 3 different php.ini files, all which I've changed the post_max_size
to more than the default 8 megabytes. I've tried changing other values too, nothing updates. It's just stuck at 8M
The three different files are located
/etc/php/7.4/apache2/php.ini
/etc/php/7.4/cli/php.ini
/etc/php/7.4/fpm/php.ini
When I add a test.php
to my website and do phpinfo()
. It tells me that the loaded php.ini
file is located in the apache2 folder.
However when I do php --ini
in my EC2 instance, it shows that the loaded php file is in the cli folder. Like I said I've edited all of them and double checked, all 3 php.ini
HAVE changes to them.
Checking the actual php.ini through the command line with php -info
I found that it actually had accepted the changes. And I guess this is the CLI php.ini, so that one has updated. But not the apache2 or fpm one.
I've tried restarting apache2 service. And restarting fpm service according to:
The master value is still the default, but the site accepts the new local value as the relevant one.