PDA

View Full Version : Graphs won't display


mgrundy
04-01-2005, 17:05
I have installed Zabbix on a server running Fedora Core3 Linux. Everything is working fine except the graphs. When I try to view a graph or trend, using Firefox, I get a message that the graph ' cannot be displayed, because it contains errors.'

Any ideas?

Rudolf
04-01-2005, 17:45
Hi mgrundy,

You need to install PHP-GD. It is php-gd-4.3.9-3 on my Fedora Core 3.

lAni
04-01-2005, 17:46
i had the "same" problem on my debian system. But my Browser just showed the error replacement pic instead of the graphs, without giving such an error message.

Then I removed the php-gd package from my server and took the php-gd2 package (which includes the php-gd i assume)

then graphs worked properly!

hope this helps ... :)

mgrundy
05-01-2005, 11:32
Thanks for the sugestions. I've tried both but still no joy.

All I get is the "I can't display the picture" icon and if I right click on it and select 'View Image' it tells me it cannot be displayed because there is an error.

mrjirey
20-02-2005, 18:54
I too had the same problem.... I was searching for the solution when I found your question, but figured out the problem just a few seconds after.

Once you have got Zabbix up and running and installed the PHP-GD, you will need to restart Apache to have it initialize PHP-GD.

Once that is done, login to Zabbix and you should be ready to go. :)

smad
15-03-2005, 19:05
Hi,

I followed your advice and I have (in fact, I hope so ;-) installed php-gd.
I use php 4.3.7 install via a tar file
I tried to update php with the command:
/configure --with-gd --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-zlib-dir=/usr/local
Restarted apache server. And the file libphp4.so modified in modules folder


But the images are still not working ;-(
Is there a tool to test if php-gd is installed properly?

Thanks for your help.
Smad

welshpjw
15-03-2005, 21:12
The php 4.3.7 you have from a tar file is older than the precompiled version from stock Fedora (4.3.9) and the updates (4.3.10). Under FC2, I've used the stock files with no problems related to php so far. I don't even have any specific php-gd package or install since the stock php comes with it (FC2 /usr/share/doc/php-4.3.10/gd_README).

You may be working to hard to get something to work that would otherwise work without much effort...

TheEdge
29-03-2005, 00:38
I ran into similair problems getting graphs to display under FC3. Here is what I did to resolve them. By default the current stable release of php for FC3 is 4.3.10 which you can get with apt-get install php4. However even though it has been compile with gd support when you do a phpinfo() you don't see anything about the GD module. You have to then install the GD module for PHP as follows: apt-get install php-gd. Then restart apache as apachectrl restart. Now if you look at the output of phpinfo() you will see information about the GD module and hey presto graphs work.

Hope this is useful to someone else.

dmusser
07-10-2005, 17:23
I have the same problem, but on RH AS instead. Are there any test graphs, or pages that we can try to verify that gd is installed properly? I did re-start apache after intalling php-gd, but no luck.

I also tested that gd in php works with some tests I found on the net, so are there any test graphs we can try to rule out DB or other errors.

chocho63
07-10-2005, 17:42
Try to see with phpinfo if GD is installed. If it's installed, it will display information like this :

gd
GD Support enabled
GD Version bundled (2.0.28 compatible)
GIF Read Support enabled
GIF Create Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled


Here is the source of phpinfo.php :

<?php
phpinfo();
?>

Lovespider
27-07-2006, 12:02
Be sure that in /etc/php4/apache/php.ini there is a line like this:

extension=gd.so

clubbing80s
31-07-2006, 17:31
My orignal post..
http://www.zabbix.com/forum/showthread.php?t=3545
Hi.
I'm also having problems with graphis ... and maps..
I can create graphs in the configuration interface, and I can create screens, there are no images generated for the maps at all..
When I go to monitoring when I go to screens all the graphs are generated, when i click on a graph there resulting page has a missing image. When I select graphs under monitoring some work but most don't ...

I have gone through the suff on this thread and all my settings seem correct...
I would like to assist in debugging this ! please advise me which files do what, and an idea where to start ..

Many thanks
Gregory Machin

stever
10-08-2006, 00:36
I just solved a graphs and maps problem on my server. Most were displaying, but some (when they had a large time period) graphs wouldn't work, and maps never worked. I looked in my apache error logs, and was getting the following:

[client 10.10.1.158] PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 2400 bytes) in /direct/_usr_local/zabbix/html/include/config.inc.php on line 2574, referer: http://rogue/maps.php

I changed this line in php.ini from 8 to 64, restarted apache, and all is well:
memory_limit = 64M

MrRobbert
15-11-2006, 15:51
Hey, i had the same problem too...

but i solved it when i retsarted my apache2 server. Very strange but it worked now my graphes are generated directly...

roiy
10-01-2007, 23:35
hey there fellas,

i broke my head but still cant figure out how come i see only graphs by hours ...
i cannot see the weekly monthly or yearly graphs with the same error that the
image contains errors.

anybody facing the same thing with this ?

i have tried enlarging the memory up to 128M but still nothing changes on this graphs.

any info i can post here will b.

ciao,

TMWTP

mfortier
20-04-2007, 16:26
yum install php-gd
service httpd restart

Worked perfectly for me, solved icons and graphs problems !

:)

from Jim O’Halloran’s Weblog

redhate
13-09-2007, 20:29
# imagecreatefromstring() [function.imagecreatefromstring]: Passed data is not in 'PNG' format[/usr/local/apache/htdocs/zabbix/include/maps.inc.php:324]
# imagecreatefromstring() [function.imagecreatefromstring]: Couldn't create GD Image Stream out of Data[/usr/local/apache/htdocs/zabbix/include/maps.inc.php:324]
# imagecreatefromstring() [function.imagecreatefromstring]: Passed data is not in 'PNG' format[/usr/local/apache/htdocs/zabbix/include/maps.inc.php:324]

only create maps

<?php phpinfo(); ?>

gd
GD Support enabled
GD Version 2.0 or higher
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled

OS: Slackware 11.0
PHP 5.2.1
Apache 1.3.39

anyone?

pdg
22-09-2007, 22:36
I had the same kind of error and I fixed it like the following... On the initial WEB ZABBIX setup.. after accepting license and providing DB user/pwd... the setup PHP program updates the configuration file and 'tries' to save it in /usr/share/zabbix/conf... if for any reason it doesn't work, the installation seams to be set with bad information.

After resinstalling the php-gd and zabbix-web packages, I insured to delete the /usr/share/zabbix/conf/zabbix-conf-php file and re-execute the WEB installation (Locally on the zabbix server machine as it need to save the conf file!). the file was properly saved and graph display worked after. One of these steps fixed the problem, quite sure it is the conf file as I initially had problems with the original setup.
Edit/Delete Message

kii
07-03-2011, 08:08
imagecreatefromstring(): Passed data is not in 'PNG' format
I have the problemimagecreatefromstring(): Passed data is not in 'PNG' format,i just figure out it.
i find the problem in apache erro_log,
libpng warning: Application built with libpng-1.2.7 but running with 1.5.1
gd-png error: cannot allocate libpng main struct
i build libpng by myself, but the system also have install libpng
GD Support enabled
GD Version 2.0
GIF Read Support enabled
GIF Create Support enabled
JPEG Support enabled
libJPEG Version 6b
PNG Support enabled
libPNG Version 1.5.1
WBMP Support enabled

i remove the libpng progrom which install by rpm package.
then i rebuild the gd Source Code,when rebuilding ,i have this problem make[2]: *** [gd_png.lo] Error 1
make[2]: Leaving directory `/tmp/gd-2.0.26gif'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/gd-2.0.26gif'
make: *** [all] Error 2
[root@RHEL3 gd-2.0.26gif]#


vi gd_png.c
find png.h ,change the include path "/usr/local/png/include/png.h"
and this problem was fixed.
then i review the gragh , i could see it:)