Division by zero in api_poller.php : 109

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
tekbot
Posts: 49
Joined: Tue Jun 07, 2005 7:42 pm
Location: Venice, CA

Division by zero in api_poller.php : 109

Post by tekbot »

Hey Guys,
I'm having a serious problem with the 1 minute polling patch for Cacti-0.8.6j (source, not .deb package) on Debian Linux and MySQL 5.

The problem is this. I can create regular (5+ minute) graphs fine. However, when I tried to build a custom graph using a data input methods / Scripts, every time I create a new graph, 1 minute OR 5 minute I get a division by 0 error.

This is a fresh install of Cacti. Initially I had the PIA1.1 patch applied, but did a clean install to a fresh directory without the PIA.

I have also tried going through the Witnesses document for 1 min network traffic, and I encounter the same problem when I try to create the Network Traffic graph.

There is a secondary error that varies depending on the graph I try to create. They are listed below

1 min Network Graphs:

Code: Select all

Warning: Division by zero in /path/to/cacti/lib/api_poller.php on line 109

Warning: Division by zero in /path/to/cacti/lib/api_poller.php on line 109

Warning: Cannot modify header information - headers already sent by (output started at /path/to/cacti/lib/api_poller.php:109) in /usr/local/MEGA-cacti/graphs_new.php on line 86
The only other information I can offer, is I can see that the offending line 109 in api_poller.php was included in the "patch" for the 1 minute polling.

Somebody please help! I love the cacti, but really need to get the 1 minute intervals running for the custom scripts.
tekbot
Posts: 49
Joined: Tue Jun 07, 2005 7:42 pm
Location: Venice, CA

Post by tekbot »

Update. Turning display_errors = Off in php.ini *supresses* this error, however, it is still occuring. It seems that there is a bug in this code, but it appears benign. Cacti functions properly with this error supressed. It should, however, be looked into -- Divide by 0 bad.

--tekbot
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest