Page 1 of 3
Upgrade PHP?
Posted: Fri Jun 21, 2013 12:25 pm
by vAJ
My InfoSec engineer is telling me that our XI instances are not in PCI compliance after finding with the version of PHP running on the CentOS VM from the site.
Has anyone upgraded PHP successfully without any issues? Any knowledge to share in preparation for the upgrade?
System:
Nagios XI Version : 2012R2.1
localhost.localdomain 2.6.32-358.6.2.el6.x86_64 x86_64
CentOS release 6.4 (Final)
Gnome is not installed
Apache Information
PHP Version: 5.3.3
Re: Upgrade PHP?
Posted: Fri Jun 21, 2013 12:38 pm
by abrist
We did run internal tests on php 5.4 and made the necessary changes for deprecated functions. You will need to upgrade php to 5.4 and XI to the latest version for 5.4 sourceguardian support. php 5.5 is not currently supported though.
Re: Upgrade PHP?
Posted: Fri Jun 21, 2013 12:41 pm
by vAJ
what were the changes made for deprecation?
Re: Upgrade PHP?
Posted: Fri Jun 21, 2013 12:44 pm
by abrist
A handful of functions were causing breakage with 5.4. Those were updated to the newer functions/syntax.
Re: Upgrade PHP?
Posted: Fri Jun 21, 2013 12:55 pm
by vAJ
Ok. I'll do this on my test system and see what I get.
Re: Upgrade PHP?
Posted: Fri Jun 21, 2013 1:01 pm
by abrist
Great, always test a big package upgrade like this before deployment. It worked in house here and we have not had any reports of issues with it, but you never know. That is why we offer the ability to run a live,backup, and test server from 1 nagios XI license. Let me know if you have issues.
Re: Upgrade PHP?
Posted: Mon Jun 24, 2013 9:52 am
by vAJ
OK. Little hiccup here.
Getting the DBConnect error:
Code: Select all
DB Connect Error [nagiosxi]: Database connection failed
I've stopped MySQL, run repair script.
Restarted apache & pgsql.
apache error log shows:
Code: Select all
PHP Fatal error: Call to undefined function pg_escape_string() in /usr/local/nagiosxi/html/includes/db.inc.php on line 329
I'm assuming I'm missing something in php.ini, but don't know what. Possibly need to recompile PHP?
Re: Upgrade PHP?
Posted: Mon Jun 24, 2013 10:58 am
by abrist
What version of php did you upgrade to?
Re: Upgrade PHP?
Posted: Mon Jun 24, 2013 11:02 am
by vAJ
5.4.16
Re: Upgrade PHP?
Posted: Mon Jun 24, 2013 11:11 am
by vAJ
Weird, I compiled from scratch and PHPInfo shows 5.4.16, but yum shows:
Code: Select all
php.x86_64 5.3.3-22.el6 @base
php-cli.x86_64 5.3.3-22.el6 @base
php-common.x86_64 5.3.3-22.el6 @base
php-gd.x86_64 5.3.3-22.el6 @base
php-ldap.x86_64 5.3.3-22.el6 @base
php-mbstring.x86_64 5.3.3-22.el6 @base
php-mcrypt.x86_64 5.3.3-1.el6.rf @rpmforge
php-mssql.x86_64 5.3.3-1.el6 @epel
php-mysql.x86_64 5.3.3-22.el6 @base
php-pdo.x86_64 5.3.3-22.el6 @base
php-pear.noarch 1:1.9.4-4.el6 @base
php-pear-HTML-Template-IT.noarch 1.3.0-2.el5 @/php-pear-HTML-Template-IT-1.3.0-2.el5.noarch
php-pgsql.x86_64 5.3.3-22.el6 @base
php-snmp.x86_64 5.3.3-22.el6 @base
php-xml.x86_64 5.3.3-22.el6 @base