Nagios PHP Upgrade: What to Know Before You Start

Picture of Andy Fried
Andy Fried
Technical Support Manager
Nagios PHP Upgrade: What To Know Before You Start

A PHP upgrade is sometimes required based on security concerns of the customer’s organization or basic requirements for Nagios software to work properly. This article describes what you need to consider before a PHP upgrade.

When Nagios software is initially installed, it relies on the base version of PHP that the OS vendor installs. The following is mostly geared towards Nagios XI, but it is applicable to our other software.

For example, RHEL 8 installs PHP 7.2, RHEL 9 installs PHP 8.0 and Ubuntu 24.04 LTS installs PHP 8.3.

As of October 1, 2026, the current versions of our software require a minimum of PHP 7.4 and have been developed and tested to run on PHP 8.4 (base version for RHEL 10).

If You Need a PHP Upgrade Within the Same Major Version

Nagios strongly recommends that you do not upgrade from one major version of PHP to another (for example, from PHP 7.x to PHP 8.x).

For example, if you are running Nagios XI on RHEL 8, with PHP 7.2, you can upgrade to anything from version 7.4 through the highest, available version of PHP 7.x, but do not upgrade to PHP 8.0 or above.

After making the upgrade, make sure to update SourceGuardian:

Nagios XI – Installing Latest SourceGuardian Loaders

When Nagios performs the initial software installation, it depends on the major version of all the components that ship with that distribution. A PHP upgrade to a different major version can cause issues with the software, as well as with the OS itself.

If You Need a PHP Upgrade to a Higher Major Version

In order to maintain the integrity of your installed version of Nagios software, migrate your XI instance to a higher level of your Linux distribution that installs the major PHP version you need.

For example, if you are on RHEL 8, running PHP 7.4 and wish to upgrade to PHP 8.3, back up and restore your XI instance from the RHEL 8 to a new RHEL 9 or RHEL 10 system. Then perform the PHP upgrade on the new instance to PHP 8.3.

Related Reading: Backing Up And Restoring XI

This will help you decide the best path to take if you need to upgrade your PHP version due to vulnerability concerns or to ensure that current Nagios software works properly, since it requires a minimum of PHP 7.4.

If You Need to Upgrade Due to Security or Vulnerability Concerns

Keep in mind that Linux vendors backport security fixes into the PHP versions they ship, so an older version number does not always mean your system is vulnerable. Please check with your Linux distribution vendor to see if you need to upgrade your version of PHP.

Contact your Linux distribution vendor for the proper method to update your version of PHP to the version you need, and stay inside the parameters listed above.

Most importantly, perform all upgrades in your test environment before your production environment, and take a snapshot or clone of your virtual machine so you can roll back if you encounter any problems.

Additional Resources

Share: