Locating php.ini
Your system may well have more than one PHP version / install. Even with the same version there can be different versions, e.g. cli and fpm
The best way to find out what version apache is using is to load a page with the following:
phpinfo();
die;
Edit php.ini
Creating a backup copy first
cp /etc/php/7.4/fpm/php.ini /etc/php/7.4/fpm/php-old.ini
Editing the file
sudo nano /etc/php/7.4/fpm/php.ini
Searching for text within file
CTRL+W
Enter your text, press return
To find the next occurrence use CTRL+W again and just press return
Specific values
upload_max_filesize – Found that apache restart didn’t update, server reboot caused new setting to load.
post_max_size – Found that apache restart didn’t update, server reboot caused new setting to load.
