Cannot show map image under WeatherMap plugin or Editor
Moderators: Developers, Moderators
Cannot show map image under WeatherMap plugin or Editor
Hi,
I have weathermap 0.97a plugin installed on cacti 0.87e.
Followed the installation steps as per instructed. Run check.php both on cli and using webbrower and everything returned fine.
The polling works fine and the png and html were created successfully. However, the image is not accessible under weathermap plugin. Even the editor is not showing any image. Direct access of the png image works (as shown by the attached image).
I have weathermap 0.97a plugin installed on cacti 0.87e.
Followed the installation steps as per instructed. Run check.php both on cli and using webbrower and everything returned fine.
The polling works fine and the png and html were created successfully. However, the image is not accessible under weathermap plugin. Even the editor is not showing any image. Direct access of the png image works (as shown by the attached image).
- Attachments
-
- error01.jpg (38.44 KiB) Viewed 7863 times
-
- error02.jpg (45.18 KiB) Viewed 7863 times
-
- image_link.jpg (35.86 KiB) Viewed 7863 times
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
What does the httpd error_log say?
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:
OK, every now and then I get a bug report from someone about loading images from php. So the files are written OK, but the code that loads the images and streams them to the browser isn't right.
However, it doesn't seem to be universal - I use CentOS 5.4 here, and have no problem, for example, so you should be OK.
Look for the lines in editor.php that say:
header("Content-type: image/png");
and replace with:
header('Content-type: image/png');
ob_clean();
flush();
and see if that helps.
If it does, there are two similar places in weathermap-cacti-plugin.php that need the same change.
The odd part is that sometimes this change *causes* the problem...
However, it doesn't seem to be universal - I use CentOS 5.4 here, and have no problem, for example, so you should be OK.
Look for the lines in editor.php that say:
header("Content-type: image/png");
and replace with:
header('Content-type: image/png');
ob_clean();
flush();
and see if that helps.
If it does, there are two similar places in weathermap-cacti-plugin.php that need the same change.
The odd part is that sometimes this change *causes* the problem...
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!)
Yes, it works!Howie wrote:OK, every now and then I get a bug report from someone about loading images from php. So the files are written OK, but the code that loads the images and streams them to the browser isn't right.
However, it doesn't seem to be universal - I use CentOS 5.4 here, and have no problem, for example, so you should be OK.
Look for the lines in editor.php that say:
header("Content-type: image/png");
and replace with:
header('Content-type: image/png');
ob_clean();
flush();
and see if that helps.
If it does, there are two similar places in weathermap-cacti-plugin.php that need the same change.
The odd part is that sometimes this change *causes* the problem...
Thanks. You save me from many more days of frustration ...
Fix didnt work for me.
I tried the above fix and it didnt work for me.
I still get the same screens as the others.
Any help would be appreciated.
Also using
Cacti Version 0.8.7e
Cacti OS unix
Weathermap 0.97a editor
RHEL
Thanks
I still get the same screens as the others.
Any help would be appreciated.
Also using
Cacti Version 0.8.7e
Cacti OS unix
Weathermap 0.97a editor
RHEL
Thanks
Works with .87e
I went back to weathermap .87e and the above fix worked.
Thanks
Thanks
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
There isn't a 0.87e... which version are you using now?
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!)
Still have a problem
Actually it only partially fixed the problem.
The editor worked but I still get the broken image icon when I try to view the weathermaps. The png files are fine but the html in the output directory wont display.
No error in httpd.log or cacti.log.
Thanks
Cacti Version 0.8.7e
Cacti OS unix RHEL
SNMP Version NET-SNMP version: 5.3.2.2
RRDTool Version RRDTool 1.2.x
PHP Weathermap version 0.97a
The editor worked but I still get the broken image icon when I try to view the weathermaps. The png files are fine but the html in the output directory wont display.
No error in httpd.log or cacti.log.
Thanks
Cacti Version 0.8.7e
Cacti OS unix RHEL
SNMP Version NET-SNMP version: 5.3.2.2
RRDTool Version RRDTool 1.2.x
PHP Weathermap version 0.97a
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
The HTML in the output folder won't work if you just open it in a browser, that is correct. It's intended to be included from within the Cacti plugin, so the path to the image would be wrong if you just open that html file in a browser.
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!)
My Mistake
I dint realize there were 2 places to make the change above.
It appears the editors works now.
I'll see about the broken link icons.
THANKS
It appears the editors works now.
I'll see about the broken link icons.
THANKS
Re: Cannot show map image under WeatherMap plugin or Editor
Hello, I did changes on editor.php and weathermap-cacti-plugin.php but im still getting the same error.
Only solved "Font Samples" with this fix.
I tried 096a and 097 with cacti 0.8.7g.
2.6.32-23-server #37-Ubuntu SMP Fri Jun 11 09:11:11 UTC 2010 x86_64 GNU/Linux
Thanks
Only solved "Font Samples" with this fix.
I tried 096a and 097 with cacti 0.8.7g.
2.6.32-23-server #37-Ubuntu SMP Fri Jun 11 09:11:11 UTC 2010 x86_64 GNU/Linux
Thanks
Re:
This resolved our problem on Server 2008 R2.Howie wrote:OK, every now and then I get a bug report from someone about loading images from php. So the files are written OK, but the code that loads the images and streams them to the browser isn't right.
However, it doesn't seem to be universal - I use CentOS 5.4 here, and have no problem, for example, so you should be OK.
Look for the lines in editor.php that say:
header("Content-type: image/png");
and replace with:
header('Content-type: image/png');
ob_clean();
flush();
and see if that helps.
If it does, there are two similar places in weathermap-cacti-plugin.php that need the same change.
The odd part is that sometimes this change *causes* the problem...
FYI you need to edit editor.php and weathermap-cacti-plugin.php
Each file has 2 entries that need to be modified.
Who is online
Users browsing this forum: No registered users and 2 guests