Nagios throwing DB errors on apache

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
johndoe
Posts: 114
Joined: Fri Oct 28, 2011 10:14 am

Nagios throwing DB errors on apache

Post 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?
Nagios XI 2012R2.8c Running on Ubuntu 12.04 Using 99% passive checks for monitoring
Monitoring nearly 800 Passive services spread through roughly 40 machines
Running on an 8 core, KVM virtualized VM, with 15 GB of RAM and using RAMDisk
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Nagios throwing DB errors on apache

Post by sreinhardt »

Is there a particular page you are viewing when this happens? Also what version of php are you on presently?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
johndoe
Posts: 114
Joined: Fri Oct 28, 2011 10:14 am

Re: Nagios throwing DB errors on apache

Post 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
Nagios XI 2012R2.8c Running on Ubuntu 12.04 Using 99% passive checks for monitoring
Monitoring nearly 800 Passive services spread through roughly 40 machines
Running on an 8 core, KVM virtualized VM, with 15 GB of RAM and using RAMDisk
johndoe
Posts: 114
Joined: Fri Oct 28, 2011 10:14 am

Re: Nagios throwing DB errors on apache

Post 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
Nagios XI 2012R2.8c Running on Ubuntu 12.04 Using 99% passive checks for monitoring
Monitoring nearly 800 Passive services spread through roughly 40 machines
Running on an 8 core, KVM virtualized VM, with 15 GB of RAM and using RAMDisk
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios throwing DB errors on apache

Post 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.
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
johndoe
Posts: 114
Joined: Fri Oct 28, 2011 10:14 am

Re: Nagios throwing DB errors on apache

Post 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]#
Nagios XI 2012R2.8c Running on Ubuntu 12.04 Using 99% passive checks for monitoring
Monitoring nearly 800 Passive services spread through roughly 40 machines
Running on an 8 core, KVM virtualized VM, with 15 GB of RAM and using RAMDisk
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios throwing DB errors on apache

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
johndoe
Posts: 114
Joined: Fri Oct 28, 2011 10:14 am

Re: Nagios throwing DB errors on apache

Post 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]#


Nagios XI 2012R2.8c Running on Ubuntu 12.04 Using 99% passive checks for monitoring
Monitoring nearly 800 Passive services spread through roughly 40 machines
Running on an 8 core, KVM virtualized VM, with 15 GB of RAM and using RAMDisk
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios throwing DB errors on apache

Post 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.
johndoe
Posts: 114
Joined: Fri Oct 28, 2011 10:14 am

Re: Nagios throwing DB errors on apache

Post by johndoe »

File in attachment
You do not have the required permissions to view the files attached to this post.
Nagios XI 2012R2.8c Running on Ubuntu 12.04 Using 99% passive checks for monitoring
Monitoring nearly 800 Passive services spread through roughly 40 machines
Running on an 8 core, KVM virtualized VM, with 15 GB of RAM and using RAMDisk
Locked