PHP Warning

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
klaus
Posts: 11
Joined: Mon Jan 30, 2012 3:52 pm

PHP Warning

Post by klaus »

Dear XI Team:

I am findind the following PHP warning in my /var/log/httpd/error_log very 5 seconds when I am logged in into XI and the Home Dashboard is open

[Fri Apr 13 21:19:29 2012] [error] [client 188.193.38.219] PHP Warning: Division by zero in /usr/local/nagiosxi/html/includes/components/xicore/ajaxhelpers-sysstat.inc.php on line 113, referer: http://h1997468.stratoserver.net/nagios ... ain.php?&=

Apart from the error message the system is running fine.

Klaus.
klaus
Posts: 11
Joined: Mon Jan 30, 2012 3:52 pm

Re: PHP Warning

Post by klaus »

In fact it is 2 PHP Warnings each time from different lines in the specific php file:

[Fri Apr 13 21:56:30 2012] [error] [client 188.193.38.219] PHP Warning: Division by zero in /usr/local/nagiosxi/html/includes/components/xicore/ajaxhelpers-sysstat.inc.php on line 111, referer: http://h1997468.stratoserver.net/nagios ... ain.php?&=
[Fri Apr 13 21:56:30 2012] [error] [client 188.193.38.219] PHP Warning: Division by zero in /usr/local/nagiosxi/html/includes/components/xicore/ajaxhelpers-sysstat.inc.php on line 113, referer: http://h1997468.stratoserver.net/nagios ... ain.php?&=
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: PHP Warning

Post by scottwilkerson »

Does this machine have 0 swap memory?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
klaus
Posts: 11
Joined: Mon Jan 30, 2012 3:52 pm

Re: PHP Warning

Post by klaus »

Correct, yes, 0 (zero) swap memory. I dont need it currently, RAM is 2 GB and usage is 200-300 MB, with no other user service running on the system. performance is ideal.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: PHP Warning

Post by scottwilkerson »

Ype, the Server Statistics Dashlet is assuming there is some swap. This is an assumption the software really shouldn't make, I will put this on the list of items to be modified.

Until this fix gets into the mix, if you want to stop the errors, if you allocate a couple kb to swap you will no longer have the division by zero.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
klaus
Posts: 11
Joined: Mon Jan 30, 2012 3:52 pm

Re: PHP Warning

Post by klaus »

Fine for me and issue can be closed on that basis.

Many thanks again!
Locked