PDA

View Full Version : gd module and test


smad
18-03-2005, 18:04
Hi,

I still don't understand why I can see the map and the graph image. :-(
I installed php 4.10 with the tar file
And I do a simple Gd test with:
<?php
/** ImageCopyMerge***/
header ("Content-type: image/jpeg");
$filename = 'sample.jpg';
$img_src = ImageCreateFromJpeg ($filename);
$size = getimagesize($filename);
$img_des = ImageCreateFromJpeg ($filename);
$white = ImageColorAllocate
($img_des, 255, 255, 255);
ImageFilledRectangle
($img_des, 0, 0, $size[0], $size[1], $white);
$opacity = 25;
ImageCopyMerge
($img_des, $img_src, 0, 0, 0, 0,
$size[0], $size[1], $opacity);
ImageJPEG ($img_des);
ImageDestroy ($img_src);
ImageDestroy ($img_des);
?>
And the result is correct.

Is there a tool to test GD on zabbix, or a log file that I can check to find the problem.

Thanks for your answer. ;-)
Smad
Red Hat 7.2, php 4.3.10, zabbix 1.0.

smad
22-03-2005, 19:44
Hi,
Now I am sure gd library are install
php info module give my this information
gd
GD Support enabled
GD Version 1.6.2 or higher
JPG Support enabled
PNG Support enabled
WBMP Support enabled


But I can't see the image in sysmap.php, map.php, or charts.php
the only one I can see is in history.php [Last hour graph (diff0)]

I really don't understand that's wrong.
There is no error message in my php log, or apache.
but there is a warning :
[22-Mar-2005 18:04:09] PHP Warning: Invalid library (maybe not a PHP library) 'libgd.so' in Unknown on line 0
[22-Mar-2005 18:04:09] PHP Warning: Invalid library (maybe not a PHP library) 'gd.so' in Unknown on line 0

Why I have a warning if the iphpinfo(INFO_MODULES); tell me it's ok ?

And mysql is running all the data is record, it's just the graph

Please, :( tell me what else I can check to find the problem.

Thanks
smad
red hat 7.2, apache 2, php 4.3.10, zabbix 1.0