Page 1 of 1

PHP support

Posted: Tue Dec 08, 2020 1:48 am
by mansonli
Current version is 2.3.0. Does it support PHP 7.3 or above? If not, which version should it be upgraded to? Can it upgrade offline similar to XI (https://repo.nagios.com/?repo=offline)?

Re: PHP support

Posted: Tue Dec 08, 2020 4:51 pm
by ssax
There is no offline installer/RPM installer for NNA at this time.

You must be on version NNA version 2.4.1 to support PHP 7.3:

Code: Select all

2.4.1 - 11/21/2019

    Updated SourceGuardian loaders to now support PHP versions up to 7.3 -JO
Taken from here:

https://www.nagios.com/downloads/nagios ... hange-log/

Re: PHP support

Posted: Wed Dec 09, 2020 4:15 am
by mansonli
Are instructions to upgrade PHP for network analyzer same as those for XI (https://support.nagios.com/kb/article/n ... 7-860.html)?

Re: PHP support

Posted: Wed Dec 09, 2020 5:56 pm
by cdienger
For the most part they seem to be the same. I ran:

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-php73
yum -y install php php-imap php-opcache php-devel php-gd php-ldap php-mbstring php-pdo 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/nagiosna
wget https://assets.nagios.com/downloads/nagiosxi/nagiosna-latest.tar.gz
tar zxf nagiosna-latest.tar.gz
cd /tmp/nagiosna
rm -rf /etc/php.d/sourceguardian.ini
I then created a bash script(install_sourceguardian.sh) in /tmp/nagiosna that contained:

Code: Select all

#!/bin/bash

. libinstall.sh

install_sourceguardian
and ran it to install the sourceguardian module:

Code: Select all

chmod 755 install_sourceguardian
./install_sourceguardian
Please note that I've done the minimum to verify these steps and the warning in the KB applies to these steps as well:
we recommend and support the version of PHP provided by operating system vendor.

Re: PHP support

Posted: Wed Dec 16, 2020 3:06 am
by mansonli
Should upgrade PHP first before upgrade network analyzer?

Re: PHP support

Posted: Wed Dec 16, 2020 2:03 pm
by cdienger
I would recommend upgrading NNA first.