Upgrade PHP from 7.2 to 7.3

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vornado
Posts: 85
Joined: Wed Jun 13, 2018 9:17 am

Upgrade PHP from 7.2 to 7.3

Post by vornado »

Good morning, all.

This morning I received this warning when update our Nagios server (CentOS 7):

1 =====================================================================
2
3 WARNING : PHP 7.2 have reached its "End of Life" in
4 November 2020. Even, if this package includes some of
5 the important security fix, backported from 7.3, the
6 UPGRADE to a maintained version is very strongly RECOMMENDED.
7
8 =====================================================================

I found a Nagios Support Knowledgebase article with instructions to upgrade to PHP 7.2, which is what we have.

https://support.nagios.com/kb/article/n ... 7-860.html

Looking at the steps in this article, it looks like some might not be necessary. Are there instructions available specifically to upgrade from PHP 7.2 to 7.3?

Thanks in advance for your usual prompt response.

Steve
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Upgrade PHP from 7.2 to 7.3

Post by benjaminsmith »

Hi,

The process is similar but you'll want to enable the repo for 7.3 and disable the other. I tested this and it worked for me but please take a VM snapshot and/or take a full backup before making any changes, or preferably run through this on a test instance before updating the production server.

Code: Select all

sudo yum-config-manager --disable remi-php72
sudo yum-config-manager --enable remi-php73
Then update the system.

Code: Select all

yum update
Re-install the Source Guardian PHP extension.

Code: Select all

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
Then restart the web server.

Code: Select all

systemctl restart httpd
Let me know if you need help or have any questions.

References:
https://tecadmin.net/install-php7-on-centos7/
https://stackoverflow.com/questions/619 ... -on-centos
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
techgeek
Posts: 18
Joined: Mon Mar 25, 2019 5:50 am

Re: Upgrade PHP from 7.2 to 7.3

Post by techgeek »

This is an interesting thread and I see php v8 is out since last November - will NagiosXI work if we upgrade to that or is it safer to saty on 7.3 or 7.4?
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Upgrade PHP from 7.2 to 7.3

Post by benjaminsmith »

Hi techgeek,

We haven't rolled out support for PHP 8 yet, it's unlikely to work by default. We usually need to adjust some to the other packages/settings for major updates.

--Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
techgeek
Posts: 18
Joined: Mon Mar 25, 2019 5:50 am

Re: Upgrade PHP from 7.2 to 7.3

Post by techgeek »

Thanks that is good to know - does Nagiosxi work with 7.4?
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: Upgrade PHP from 7.2 to 7.3

Post by dchurch »

Good question. Yes, Nagios XI will run in PHP 7.4 as long as you're using Nagios XI 5.7.0 or later.

Supported PHP versions for Nagios XI:
  • 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+)
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.

Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
vornado
Posts: 85
Joined: Wed Jun 13, 2018 9:17 am

Re: Upgrade PHP from 7.2 to 7.3

Post by vornado »

Sorry I didn't reply sooner -- the upgrade went well. Thanks for your help!

Steve
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: Upgrade PHP from 7.2 to 7.3

Post by dchurch »

Glad to hear you resolved it! Locking thread.

If you have any additional issues, feel free to make a new thread.
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.

Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Locked