Can't generate .png from poller.php
Moderators: Developers, Moderators
Can't generate .png from poller.php
Hello, i was using weathermap 0.82 and i upgraded to 0.91 today and since this time the generation from poller.php fail
PHP Warning: Division by zero in /.../cacti-0.8.6i/plugins/weathermap/setup.php on line 314
PHP Fatal error: Out of memory (allocated 131334144) (tried to allocate 1050 bytes) in /.../cacti-0.8.6i/plugins/
weathermap/Weathermap.class.php on line 176
I was using memory_limit = 64M, i tried with memory_limit = 256M but it still don't work.
If i use the "recalculate all maps now" button or if i run weathermap from cli (php weathermap --config configs/MPLS.conf) it works fine. (weathermap-cacti-rebuild.php also work)
So i think there is a bug somewhere (may be related to the division by zero warning ?)
PHP Warning: Division by zero in /.../cacti-0.8.6i/plugins/weathermap/setup.php on line 314
PHP Fatal error: Out of memory (allocated 131334144) (tried to allocate 1050 bytes) in /.../cacti-0.8.6i/plugins/
weathermap/Weathermap.class.php on line 176
I was using memory_limit = 64M, i tried with memory_limit = 256M but it still don't work.
If i use the "recalculate all maps now" button or if i run weathermap from cli (php weathermap --config configs/MPLS.conf) it works fine. (weathermap-cacti-rebuild.php also work)
So i think there is a bug somewhere (may be related to the division by zero warning ?)
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: Can't generate .png from poller.php
That's odd. It seems that some of the new settings in 0.9 weren't automatically created for you. You might like to try: Settings, Misc and then just Save (don't change anything). That ought to fill in any gaps, I think.Jeb wrote:Hello, i was using weathermap 0.82 and i upgraded to 0.91 today and since this time the generation from poller.php fail
PHP Warning: Division by zero in /.../cacti-0.8.6i/plugins/weathermap/setup.php on line 314
PHP Fatal error: Out of memory (allocated 131334144) (tried to allocate 1050 bytes) in /.../cacti-0.8.6i/plugins/
weathermap/Weathermap.class.php on line 176
I was using memory_limit = 64M, i tried with memory_limit = 256M but it still don't work.
If i use the "recalculate all maps now" button or if i run weathermap from cli (php weathermap --config configs/MPLS.conf) it works fine. (weathermap-cacti-rebuild.php also work)
So i think there is a bug somewhere (may be related to the division by zero warning ?)
However, assuming that fixes the divide-by-zero, you might now have permissions problems as a result of using Recalc Now - just be aware...
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!)
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
If you are able to log into the mysql database for your cacti and run the following commands:Jeb wrote:Thanks for your quick answer. It doesn't solve my problem, i still get the same error :/
Code: Select all
replace into settings values('weathermap_render_counter',0);
replace into settings values('weathermap_render_period',1);
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!)
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
No, it should be 0.Jeb wrote:Ok, in fact weathermap_render_period value is 0 in the database when i chose every poller cycle.
In the html code :
<option value="0" selected>Every Poller Cycle (default)</option>
I think it should be 1 instead of 0 !
anything mod 0 == 0
It doesn't really make much difference if it's 1, but it was 0 for a reason (I don't recall the reason right now ). Besides which, it is working for several hundred other people.
I've just tried 0%0, 0%1, 1%0 and 1%1 and none of those give me a div-by-zero, in fact. Even NULL%0 didn't. So I'm a little puzzled.
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!)
<?
if ((1 % 0) == 0) {
echo "Ok";
}
?>
Give me "PHP Warning: Division by zero"
0%0 give me the same.
1%1 and 0%1 are ok
i'am using PHP 5.2.1, i've tested with a PHP 5.1.6 and with it %0 is Ok, on PHP 5.2.0-8+etch4 there is a warning...
But i may have said too fast that saving setting didn't solve my problem because i put back weathermap_render_period to 0 and it's working... may be there was the need to way for 2 cycle after saving data for the "bug" to go out...
Anyway thank you
if ((1 % 0) == 0) {
echo "Ok";
}
?>
Give me "PHP Warning: Division by zero"
0%0 give me the same.
1%1 and 0%1 are ok
i'am using PHP 5.2.1, i've tested with a PHP 5.1.6 and with it %0 is Ok, on PHP 5.2.0-8+etch4 there is a warning...
But i may have said too fast that saving setting didn't solve my problem because i put back weathermap_render_period to 0 and it's working... may be there was the need to way for 2 cycle after saving data for the "bug" to go out...
Anyway thank you
Who is online
Users browsing this forum: No registered users and 5 guests