For those of you that need to upgrade their php from 7.2 to 7.4, here is the process that I went through and was able to do so easily on Ubuntu18.04LTS
Add php7.4 libraries
sudo apt update
sudo apt -y install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo add-apt-repository ppa:ondrej/apache2
sudo apt update
Remove php7.2
apt purge libapache2-mod-php7.2 php7.2-cli php7.2-curl php7.2-gd php7.2-json php7.2-mbstring php7.2-mysql php7.2-snmp php7.2-xml php7.2-zip
Install php7.4
apt install composer php7.4 php7.4-cli php7.4-curl php7.4-fpm php7.4-gd php7.4-json php7.4-mbstring php7.4-mysql php7.4-snmp php7.4-xml php7.4-zip
Change Timezone
vi /etc/php/7.4/fpm/php.ini
vi /etc/php/7.4/cli/php.ini
Configure PHP-FPM
cp /etc/php/7.4/fpm/pool.d/www.conf /etc/php/7.4/fpm/pool.d/librenms.conf
vi /etc/php/7.4/fpm/pool.d/librenms.conf
[www] to [librenms]
user = librenms
group = librenms
listen = /run/php-fpm-librenms.sock
update /etc/apache2/sites-available/librenms.conf
mv /etc/apache2/sites-available/librenms.conf /etc/apache2/sites-available/librenms-7.2.conf
vi /etc/apache2/sites-available/librenms.conf
*** use this as template; dont forget to change this per your 7.2 verision ***
<VirtualHost *:80>
DocumentRoot /opt/librenms/html/
ServerName librenms.example.com
AllowEncodedSlashes NoDecode
<Directory "/opt/librenms/html/">
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
</Directory>
<IfModule setenvif_module>
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
</IfModule>
<FilesMatch ".+\.php$">
SetHandler "proxy:unix:/run/php-fpm-librenms.sock|fcgi://localhost"
</FilesMatch>
</VirtualHost>
Restart services
a2enmod proxy_fcgi setenvif rewrite
a2ensite librenms.conf
systemctl restart apache2
systemctl restart php7.4-fpm
This worked like a charm for me. Thanks again to Tony for leading me in the right direction and Hans for helping to develop and validate.
Cheers!