PDA

View Full Version : Main Dashboard Host Graph


fatmcgav
11th March 2008, 18:02
Hi there,

For some reason, i dont see a Dashboard Host graph...
As in if i go into Reporting, and select a host, i dont get a graph generated in the top left area...
It worked fine on my test box, however i installed on another box and it doesnt work now...

Any ideas?

I've attached a screenshot to show you what i'm refering to...

Any info appreciated.

Cheers
Gavin

kanakyirie
12th March 2008, 13:50
It look like you have a problem with the librairy that generated images in PHP.

Do you have errors in your apache logs?
Have you installed the gd librairy ?

fatmcgav
12th March 2008, 14:01
It look like you have a problem with the librairy that generated images in PHP.

Do you have errors in your apache logs?
Have you installed the gd librairy ?

Hi there,

Cheers for the response.

However, no errors in the apache log file. I've got GD installed, phpinfo shows this:
gd
GD Support enabled
GD Version 2.0 or higher
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.9
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled


Edit: Just noticed i've got no graphs on the front page either... :S

Any ideas?

Cheers
Gavin

bananana
12th March 2008, 14:56
I just had a similar problem.

You can try this url (of course this is the url if centreon is on your localhost):
http://127.0.0.1/centreon/include/home/pie_chart_host.php

This should give you an error message, or a warning message if the graphs doesn't appear. (i suppose of course, in my case, this gave me a good information)

Could you post here the error you have ?

P.S: Sorry for my english, i'm french

fatmcgav
12th March 2008, 15:08
Hi bananana

Cheers for the info.
I tried the link you posted, and it gives me this error:
Warning: imagettfbbox(): Could not find/open font in /opt/php5/lib/php/Image/Canvas/GD.php on line 1374 Warning: imagettfbbox(): Could not find/open font in /opt/php5/lib/php/Image/Canvas/GD.php on line 1378 Warning: imagettfbbox(): Could not find/open font in /opt/php5/lib/php/Image/Canvas/GD.php on line 1382 Warning: Division by zero in /opt/php5/lib/php/Image/Canvas/GD.php on line 1386 Warning: imagettfbbox(): Could not find/open font in /opt/php5/lib/php/Image/Canvas/GD.php on line 1418 Warning: imagettftext(): Could not find/open font in /opt/php5/lib/php/Image/Canvas/GD.php on line 1494 Warning: imagettfbbox(): Could not find/open font in /opt/php5/lib/php/Image/Canvas/GD.php on line 1245 Warning: imagettfbbox(): Could not find/open font in /opt/php5/lib/php/Image/Canvas/GD.php on line 1374 Warning: imagettfbbox(): Could not find/open font in /opt/php5/lib/php/Image/Canvas/GD.php on line 1378 Warning: imagettfbbox(): Could not find/open font in /opt/php5/lib/php/Image/Canvas/GD.php on line 1382 Warning: Division by zero in /opt/php5/lib/php/Image/Canvas/GD.php on line 1386 Warning: imagettfbbox(): Could not find/open font in /opt/php5/lib/php/Image/Canvas/GD.php on line 1418 Warning: imagettftext(): Could not find/open font in /opt/php5/lib/php/Image/Canvas/GD.php on line 1494 Warning: imagettfbbox(): Could not find/open font in /opt/php5/lib/php/Image/Canvas/GD.php on line 1245 Warning: imagettfbbox(): Could not find/open font in /opt/php5/lib/php/Image/Canvas/GD.php on line 1245 Warning: imagettfbbox(): Could not find/open font in /opt/php5/lib/php/Image/Canvas/GD.php on line 1374 Warning: imagettfbbox(): Could not find/open font in /opt/php5/lib/php/Image/Canvas/GD.php on line 1378 Warning: imagettfbbox(): Could not find/open font in /opt/php5/lib/php/Image/Canvas/GD.php on line 1382 Warning: Division by zero in /opt/php5/lib/php/Image/Canvas/GD.php on line 1386 Warning: imagettftext(): Could not find/open font in /opt/php5/lib/php/Image/Canvas/GD.php on line 1494 Warning: Cannot modify header information - headers already sent by (output started at /opt/php5/lib/php/Image/Canvas/GD.php:1374) in /opt/php5/lib/php/Image/Canvas.php on line 644 Warning: Cannot modify header information - headers already sent by (output started at /opt/php5/lib/php/Image/Canvas/GD.php:1374) in /opt/php5/lib/php/Image/Canvas.php on line 645 Warning: Cannot modify header information - headers already sent by (output started at /opt/php5/lib/php/Image/Canvas/GD.php:1374) in /opt/php5/lib/php/Image/Canvas.php on line 646 Warning: Cannot modify header information - headers already sent by (output started at /opt/php5/lib/php/Image/Canvas/GD.php:1374) in /opt/php5/lib/php/Image/Canvas.php on line 647 Warning: Cannot modify header information - headers already sent by (output started at /opt/php5/lib/php/Image/Canvas/GD.php:1374) in /opt/php5/lib/php/Image/Canvas/GD/PNG.php on line 104 Warning: Cannot modify header information - headers already sent by (output started at /opt/php5/lib/php/Image/Canvas/GD.php:1374) in /opt/php5/lib/php/Image/Canvas/GD/PNG.php on line 105 ‰PNG ���

Sounds like something's wrong in the my config... Is that a missing font?

Cheers
Gavin

stefaneo
12th March 2008, 15:28
usually there is a seperate rpm for php and gd lib

php5-gd-5.2.0-10

or for example if you use gentoo you have to emerge it with the gd use flag ^^

so depending on your distribution your just missing the seperate gd lib for php, which is included in a different package

btw restart apache once you installed it

fatmcgav
12th March 2008, 15:31
This was all compiled from Source, as the box is an old FC2 install, and teh packages are years out of date...

Any idea where i'd get the lib from?

Cheers
Gavin

bananana
12th March 2008, 15:48
I had exactly the same problem ! i know what to do
In fact the font are missing in your /opt/php5/lib/php/Image/Canvas/Fonts/ dir

In this folder you have the fontmap.txt file. in this file it is written then name of the font in GD and then, the name off the ttf file. You must copie (or link with ln) the font files int the /opt/php5/lib/php/Image/Canvas/Fonts dir

At the end of that, you must have in your Font folder the différent file from your fontmap.txt. For exemple, there must be :
arial.ttf
arialbd.ttf
arialbi.ttf
...
and so on.

I don't know if my explication are good enough, but my english isn't so good.

Good luck

fatmcgav
12th March 2008, 15:53
Spot on Bananana,

Cheers for the info.
In the end, all i did is copy arial.ttf across into that folder. :) :D

Cheers
Gavin
I had exactly the same problem ! i know what to do
In fact the font are missing in your /opt/php5/lib/php/Image/Canvas/Fonts/ dir

In this folder you have the fontmap.txt file. in this file it is written then name of the font in GD and then, the name off the ttf file. You must copie (or link with ln) the font files int the /opt/php5/lib/php/Image/Canvas/Fonts dir

At the end of that, you must have in your Font folder the différent file from your fontmap.txt. For exemple, there must be :
arial.ttf
arialbd.ttf
arialbi.ttf
...
and so on.

I don't know if my explication are good enough, but my english isn't so good.

Good luck