Upgrading PHP version used in XI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
TELUS_NET
Posts: 6
Joined: Tue Sep 10, 2013 3:45 pm

Upgrading PHP version used in XI

Post by TELUS_NET »

Hi,

I wanted to inquire as to the process involved in upgrading PHP from 5.3 to 5.5 on XI. There are some security vulnerabilities in 5.3 that don't have fixes backported.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Upgrading PHP version used in XI

Post by ssax »

The latest version that you could go up to is 5.4 because that is what our SourceGuardian PHP extension supports.

We don't have a guide that you can follow to upgrade PHP from 5.3 to 5.4, you will need to work with your system administrator to get it upgraded.

*** Make sure that you make backups/snapshots, preferably multiple, just in case something goes wrong.

You need to make sure that you update ALL of the PHP packages/modules that are installed on your system.

Once you have upgraded PHP make sure to run the upgrade script on your installation to install the proper SourceGuardian files for PHP 5.4.
  • * Just go into the XI installer directory (the one that you used to install XI) and run ./upgrade to do an in-place upgrade.
Let us know if you have any additional questions.
geoffmyers
Posts: 22
Joined: Fri Apr 03, 2015 3:57 pm

Re: Upgrading PHP version used in XI

Post by geoffmyers »

Is there any possibility of getting a high level how to for this? 5.3.3 which is what is packaged on the VM was release almost 3 years ago and has many many security vulnerabilities. I would expect you to be able to have a howto for a VM that you created.

Without upgrading php, makes it very difficult to recommend this product to my management going forward.

Thanks,

Geoff
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Upgrading PHP version used in XI

Post by jdalrymple »

Hi geoffmyers

It's very doable - but you will be maintaining your packages outside of the yum db which generally we don't recommend.

Easy option: use CentOS 7

Hard option: use CentOS 6.6

after fullinstall:

Code: Select all

for pkg in php php-cli php-common php-mysql php-pdo php-pgsql; do rpm --nodeps -e $pkg; done
wget http://dl.iuscommunity.org/pub/ius/stable/CentOS/6/x86_64/ius-release-1.0-13.ius.centos6.noarch.rpm
rpm -ivh ius-release-1.0-13.ius.centos6.noarch.rpm
yum install php54 php54-cli php54-common php54-mysql php54-pdo php54-pgsql
reboot
Try to launch the XI WebUI and there will be instructions on fixing sourceguardian.

After all that I have a "seemingly" functional XI install. YMMV - and we will have trouble officially supporting it once you've reached outside the yum repos we prescribe.
You do not have the required permissions to view the files attached to this post.
geoffmyers
Posts: 22
Joined: Fri Apr 03, 2015 3:57 pm

Re: Upgrading PHP version used in XI

Post by geoffmyers »

Is upgrading the nagios VM to centos 7 supported?
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Upgrading PHP version used in XI

Post by jdalrymple »

CentOS 7 is supported.

We'd prefer that you do a clean install/backup/restore/test

if all goes well

clean install/backup/restore/downtime/prod

Upgrading from Cent6 to Cent7 is something you could do, but unless there external incentive to go that route I'd encourage the fresh install.
geoffmyers
Posts: 22
Joined: Fri Apr 03, 2015 3:57 pm

Re: Upgrading PHP version used in XI

Post by geoffmyers »

Is it possible you will release the nagios VM ovf as centos 7 anytime soon, so I can save myself some effort?

Thanks.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Upgrading PHP version used in XI

Post by jdalrymple »

geoffmyers,

It will happen, but the timetable is as of yet uncertain. Our build process for those OVFs is an automated process and we have to do some work behind the curtains here to make that happen.

I'm sure that's not the answer you're looking for - but I do have good news. A CentOS7 minimal install, wget, then fullinstall script is really really ridiculously simple and quick. I could probably have the whole process knocked out in less time here than it would take you to download the ovf there.

Let us know if we can help further.
geoffmyers
Posts: 22
Joined: Fri Apr 03, 2015 3:57 pm

Re: Upgrading PHP version used in XI

Post by geoffmyers »

I was finally able to carve some time out to do a fresh install, but I am having some issues with restoration. Here is what I've done.

Fresh install of Centos7
Fresh install of Nagios, confirmed working
Entered my license information

*** Everything works at this point and I can login to the webUI ***

Followed backup and restore document:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Including the bit at the end regarding recompling the binaries and stuff. As far as I can tell the restoration has gone well.

After the restoration, the UI front page is all messed up, and when I click the access nagios link, I get a Forbidden error. See attachments.
You do not have the required permissions to view the files attached to this post.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Upgrading PHP version used in XI

Post by Box293 »

In the folder that you ran ./fullinstall from, can you please run ./upgrade and see if that fixes the problem.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked