Thanks ssax; I realized that since June '20, the Source Guardian was able to be updated as well for PHP 7.4, I wrote a small how-to, so if someone runs into the same issue than I did, it may help.
--------------------------
Upgrade PHP from 5.1.16 to 7.4 in Nagios Log Server with version 2.1.7 on server running with CentOS 7
Before any major upgrade/update, ensure you have a full backup in place
1) yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo
2) yum install
http://rpms.remirepo.net/enterprise/remi-release-7.rpm
3) If no yum-utils, install them -> yum install yum-utils
4) Enable PHP 7.4 by --> yum-config-manager --enable remi-php74
5) yum update
done
When rebooting, you will get an error on the Nagios log Server main page telling the application is protected by Source Guardian:
1) Download file ixed.7.4.lin
2) Copy file using WinSCP to Nagios Log Server --> path /usr/lib64/php/modules
3) Remove file ixed.5.1.lin at th same previous location
4) cd /etc/php.d
5) vi sourceguardian.ini
6) add extension=ixed.7.4.lin and remove extension=ixed.5.1.lin line
7) Save file and move out of VI
8) Restart Apache web server --> sudo systemctl restart httpd.service
--------------------------
ssax wrote:This should work for you (tested on mine), it uses the remi repo (it's a 3rd party repo):
Code: Select all
yum -y install yum-utils
PHPTZ=$(grep -s '^date.timezone' /etc/php.ini | awk '{print $3}')
yum -y remove php-*
yum-config-manager --enable remi-php74
yum -y install php php-common php-devel php-cli php-ldap
sed -i "s:;date.timezone =.*:date.timezone = ${PHPTZ}:" /etc/php.ini
cd /tmp
rm -rf /tmp/nagioslogserver
wget https://assets.nagios.com/downloads/nagios-log-server/2/nagioslogserver-2.1.7.tar.gz
tar xzf nagioslogserver-2.1.7.tar.gz
cd nagioslogserver
./upgrade
The reason you re-run the upgrade is to install the proper sourceguardian loaders for your new version of PHP.