Page 1 of 3

Nagios throwing DB errors on apache

Posted: Wed Feb 26, 2014 11:02 am
by johndoe
Nagios XI (version 2.8RC ) is throwing many of these errors on the /var/log/httpd/error_log

Code: Select all

[Wed Feb 26 16:00:02 2014] [error] [client ::1] PHP Strict Standards:  Only variables should be assigned by reference in /usr/local/nagiosxi/html/includes/db.inc.php on line 260
How to remove them?

Re: Nagios throwing DB errors on apache

Posted: Wed Feb 26, 2014 2:57 pm
by sreinhardt
Is there a particular page you are viewing when this happens? Also what version of php are you on presently?

Re: Nagios throwing DB errors on apache

Posted: Wed Feb 26, 2014 4:38 pm
by johndoe
This seems to be happening on the https://XXXXX/nagiosxi/dashboards/dashb ... ?id=7a56ne page

Code: Select all

# php -v
PHP Warning:  PHP Startup: SourceGuardian: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525
These options need to match
 in Unknown on line 0
PHP 5.4.24 (cli) (built: Jan 13 2014 12:36:47)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

Re: Nagios throwing DB errors on apache

Posted: Wed Feb 26, 2014 4:46 pm
by johndoe
Just upgraded php to the following and errors still occurr

Code: Select all

# php -v
PHP Warning:  PHP Startup: SourceGuardian: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525
These options need to match
 in Unknown on line 0
PHP 5.4.25 (cli) (built: Feb 10 2014 08:04:23)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

Re: Nagios throwing DB errors on apache

Posted: Thu Feb 27, 2014 2:19 pm
by lmiltchev
Try the following - download the file below:
patch_sourceguardian.zip
copy it over to the "/tmp" directory on your Nagios XI server, and run the following commands:

Code: Select all

cd /tmp
unzip patch_sourceguardian.zip
cd patch_sourceguardian
chmod +x *
./patch_sourceguardian.sh
Restart apache:

Code: Select all

service httpd restart
Let me know if this fixed your issue.

Re: Nagios throwing DB errors on apache

Posted: Mon Mar 03, 2014 7:09 am
by johndoe
That didn't solve it...
[root@XXXX patch_sourceguardian]# tail -f /var/log/httpd/error_log

Code: Select all

[Mon Mar 03 12:06:45 2014] [error] [client ::1] PHP Strict Standards:  Only variables should be assigned by reference in /usr/local/nagiosxi/html/includes/db.inc.php on line 260
^C
[root@XXXX patch_sourceguardian]# ^C
[root@XXXX patch_sourceguardian]# php -v
PHP Warning:  PHP Startup: SourceGuardian: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525
These options need to match
 in Unknown on line 0
PHP 5.4.25 (cli) (built: Feb 10 2014 08:04:23)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
[root@XXXX patch_sourceguardian]#

Re: Nagios throwing DB errors on apache

Posted: Mon Mar 03, 2014 3:04 pm
by lmiltchev
OK, run the following commands and show us the output:

Code: Select all

killall -HUP php
cd /tmp/patch_sourceguardian
./patch_sourceguardian.sh > /tmp/debug.txt
cat /tmp/debug.txt
service httpd restart
php --version

Re: Nagios throwing DB errors on apache

Posted: Tue Mar 04, 2014 8:15 am
by johndoe

Code: Select all

[root@XXXX patch_sourceguardian]# # killall -HUP php
[root@XXXX patch_sourceguardian]# ./patch_sourceguardian.sh > /tmp/debug.txt
PHP Warning:  PHP Startup: SourceGuardian: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525
These options need to match
 in Unknown on line 0
[root@XXXX patch_sourceguardian]# cat /tmp/debug.txt
Archive:  sourceguardian/ixed4.lin.x86-64.zip
  inflating: /usr/lib64/php/modules/ixed.5.4.lin
Sourceguardian extension found for PHP version 5.4
Sourceguardian extension already in php.ini
[root@XXXX patch_sourceguardian]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
                                                           [  OK  ]
[root@XXXX patch_sourceguardian]# php --version
PHP Warning:  PHP Startup: SourceGuardian: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525
These options need to match
 in Unknown on line 0
PHP 5.4.25 (cli) (built: Feb 10 2014 08:04:23)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
[root@XXXX patch_sourceguardian]#



Re: Nagios throwing DB errors on apache

Posted: Tue Mar 04, 2014 5:43 pm
by slansing
What is actually on line 260 of your:

Code: Select all

/usr/local/nagiosxi/html/includes/db.inc.php
It might be best to attach it here so we can diff them.

Re: Nagios throwing DB errors on apache

Posted: Wed Mar 05, 2014 7:19 am
by johndoe
File in attachment