This is a cache of https://support.nagios.com/kb/article/nagios-xi-upgrading-to-php-7-860.html. It is a snapshot of the page at 2025-05-14T00:09:50.903+0000.
Nagios <strong>xi</strong> - Upgrading To PHP 7
Home » Categories » Multiple Categories

Nagios xi - Upgrading To PHP 7

Overview

 

Warning: Do not use the steps in this article if you have an RPM installed system (either offline or non-offline).


This document describes how to upgrade to PHP 7 on RHEL, CentOS and Oracle Linux systems. Nagios xi is compatible with the following versions of PHP.

5.3, 5.4, 5.5, 5.6 | 7.0, 7.1, 7.2 (xi 5.5+) | 7.3 (xi 5.6.8+) | 7.4 (xi 5.7.0+)

For performing installations and upgrades, Nagios xi uses the version of PHP provided by the operating system vendor such as RHEL, CentOS and Oracle Linux. For security and stability, we recommend and support the version of PHP provided by operating system vendor.

To mitigate security vulnerabilities and avoid backward compatibility issues, operating system vendors have a process known as backporting. Here's how it works: RHEL patches the supported versions of these packages with the security fixes from the newer versions of these packages. For example, they will take the code from PHP 7.2 and apply the security vulnerability fix to the version of PHP provided by their repositories such as 5.4.x.

NOTE: PHP Mailer requires PHP 5.6 or higher to use a TLS 1.2 connection.

 

Upgrading to PHP 7

 

If your company environment requires upgrading to PHP 7.x, please follow the commands below. These steps have been created to minimize upgrade or system failures due to PHP package incompatibilities.

Must be using Nagios xi 5.5 or higher to upgrade to PHP 7.

All

yum -y install epel-release wget
yum remove nagiosxi-deps* -y

 

RHEL 7 | CentOS 7 | Oracle Linux 7

rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm

 

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-imap php-opcache php-devel php-gd php-ldap php-mbstring php-pdo php-pdo-dblib php-mysqlnd php-pgsql php-pear php-pecl-ssh2 php-pgsql php-process php-snmp php-xml php-odbc
sed -i "s:;date.timezone =.*:date.timezone = ${PHPTZ}:" /etc/php.ini
cd /tmp
rm -rf /tmp/nagiosxi
wget https://assets.nagios.com/downloads/nagiosxi/xi-latest.tar.gz
tar zxf xi-latest.tar.gz
cd /tmp/nagiosxi
rm -rf /etc/php.d/sourceguardian.ini
./init.sh
sed -i '/^PHP script/d' xi-sys.cfg
sed -i '/^1)/d' xi-sys.cfg
sed -i '/^2)/d' xi-sys.cfg
sed -i '/^3)/d' xi-sys.cfg
./install-sourceguardian-extension.sh

 

RHEL 7 | CentOS 7 | Oracle Linux 7

systemctl restart httpd

 

Once completed you should login to Nagios xi and test everything is working OK. A system reboot is also recommended.

  

Final Thoughts

For any support related questions please visit the Nagios Support Forums at:

http://support.nagios.com/forum/



Special Offer For Knowledgebase Visitors! Get a huge discount on Nagios Log Server by clicking below.

Get 60% Off Nagios Log Server!

Did you know? Nagios provides complete monitoring of: Windows, Linux, UNIX, Servers, Websites, SNMP, DHCP, DNS, Email, Storage, Files, Apache, IIS, EC2, and more!

3 (4)
Article Rating (4 Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
Nagios xi - Excluding Hosts And Hostgroups
Viewed 6948 times since Tue, May 2, 2017
Managing Host Templates
Viewed 9511 times since Mon, Jun 28, 2021
Using The Generic Plugin Monitoring Wizard In Nagios xi
Viewed 1118 times since Tue, Dec 17, 2024
Nagios xi - mysql_error out of range value for column
Viewed 6701 times since Tue, Aug 14, 2018
NDOUtils - Data Processing Options in ndomod.cfg
Viewed 8474 times since Thu, Oct 22, 2015
Nagios xi - License Maintenance Status Check
Viewed 11692 times since Thu, Feb 25, 2016
Nagios xi - Hardware Requirements - Baseline Testing
Viewed 6693 times since Sun, Jul 17, 2016
Nagios xi - Distributed Monitoring With NRDP
Viewed 7106 times since Thu, Aug 17, 2017
Nagios xi - How To Test Check Commands From The Command-line
Viewed 49115 times since Tue, Jan 26, 2016
Nagios xi - Configuring Global Event Handlers
Viewed 7286 times since Wed, Jan 27, 2016