I'm trying to get weathermap going on a new fedora 7 machine and its telling me: PHP Warning: Division by zero in /var/www/html/cacti/plugins/weathermap/setup.php on line 314
I have it running on FC5 with no problems, the map DOES get correctly rendered on F7 so it might be cosmetic.
Any ideas ?
PHP Warning: Division by zero
Moderators: Developers, Moderators
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: PHP Warning: Division by zero
Do you get this more than once? It looks like a default is not being set correctly. You should be able to fix it by going into the Settings..Misc in Cacti, and setting the Map Rendering Interval to Every Polling Cycle, which should re-write the setting.Conz wrote:I'm trying to get weathermap going on a new fedora 7 machine and its telling me: PHP Warning: Division by zero in /var/www/html/cacti/plugins/weathermap/setup.php on line 314
I have it running on FC5 with no problems, the map DOES get correctly rendered on F7 so it might be cosmetic.
Any ideas ?
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Ok i tried that and that didn't help, i did find out after some experimenting that it has to do with the weathermap_render_period and weathermap_render_counter variables, when i change the update cycle to manual or anything but every update poller cycle causes the error.
fixed it by changing setup.php (around line 314):
To:
it seems that renderperiod 0 is every update and 1 is manual, allthough somehow i think it should be the other way around.
fixed it by changing setup.php (around line 314):
Code: Select all
if( ($rendercounter % $renderperiod) == 0)
{
weathermap_run_maps(dirname(__FILE__) );
}
Code: Select all
if ($renderperiod == 0) {
weathermap_run_maps(dirname(__FILE__) );
} else if( ($rendercounter % $renderperiod) == 0) {
weathermap_run_maps(dirname(__FILE__) );
}
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Hmm. There was some discussion of this once before. My understanding was that anything mod 0 is 0 but it seems that in at least some php versions, that's not the case.
I'll make the change as you suggest, I think.
I'll make the change as you suggest, I think.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Who is online
Users browsing this forum: No registered users and 0 guests