PDA

View Full Version : MAP now shown


Lovespider
25-11-2004, 12:22
Hello,
I've tried to create a new map, with and without the background graph.
In both cases I get only the placeholder of the image...not the graph.
I cheched the table named "images" and it contains all the png files.
Any ideas?

Rgds,
Lovespider

Lovespider
26-11-2004, 11:26
I deleted all the links and hosts and map. Created a new one with no background: it shows the grid until I add any host, then it disappear. If I create a new one with the background, it never shows.
I think this problem is related to the "images" table...is like it cannot show the embedded png file.
Any news?

Rgds,
Lovespider

Jabasf
26-11-2004, 15:30
Hi,

I'm using 1.1alpha2, the map is now working : i have a white background with the grid. But when I try to choose an icon for my host, there is no pictures/icons available on the list...maybe the same troubles a table ?
So I have a horrible black square in place of a beautiful icon made by Alexei.

Any ideas ? :confused:

Alexei
26-11-2004, 16:35
Obviously you haven't loaded images.sql. Note that the file has to be modified to include FULL pathnames in all load_file("/full/path/Phone.png") statements. I know it's not documented yet, but this is alpha... :rolleyes:

Lovespider
27-11-2004, 12:58
Hi Alexei,
as you mentioned, I imported the png files with full pathnames and I can see them in table "Images". The problem is that when a image is selected, for background or for host icon, I get a [Image] placeholder and not the image itself (please see my last posts). My problem is differend from the Jabasf's one.
Thanks,
Lovespider

limo
26-12-2004, 11:51
Hello,

I had same problem with not showing map. I saw only broken image icon. I do not know if tihs is your ptoblem, but in most cases this is due to buggy gd2 code. Especially, imagecreatefromstring() is too much broken. Try to change gd2 libraries and everything what depends on it. I tried this and repaired problem. (But it was not so easy..) To know if you have same problem as me, look to apache error log. If you see something about apache killed or died, it is gd2 problem.

Lovespider
04-01-2005, 17:53
Dear Limo,
I checked error.log in apache and I found:

[Tue Jan 4 16:48:25 2005] [notice] child pid 5531 exit signal Segmentation fault (11)
[Tue Jan 4 16:48:25 2005] [notice] child pid 5530 exit signal Segmentation fault (11)
[Tue Jan 4 16:48:26 2005] [notice] child pid 7740 exit signal Segmentation fault (11)
[Tue Jan 4 16:48:26 2005] [notice] child pid 7739 exit signal Segmentation fault (11)

just when viewing maps....now I removed php4-gd2, libgd-xpm, libgs-xpm-dev etc etc and reinstalled but I get same errors. Do you have any other suggestions?
Thank you very much and Happy New Year!
Lovespider

Rudolf
04-01-2005, 19:07
Oh I see the map graphics now. But editing images.sql and setting the full path to the images did not work in first try. (I compiled zabbix in a subfolder of /root). I copied the png files in a directory in /tmp and set the path in images.sql to this directory. This worked for me fine.

limo
05-01-2005, 09:16
Dear Limo,
I checked error.log in apache and I found:

[Tue Jan 4 16:48:25 2005] [notice] child pid 5531 exit signal Segmentation fault (11)
[Tue Jan 4 16:48:25 2005] [notice] child pid 5530 exit signal Segmentation fault (11)
[Tue Jan 4 16:48:26 2005] [notice] child pid 7740 exit signal Segmentation fault (11)
[Tue Jan 4 16:48:26 2005] [notice] child pid 7739 exit signal Segmentation fault (11)

just when viewing maps....now I removed php4-gd2, libgd-xpm, libgs-xpm-dev etc etc and reinstalled but I get same errors. Do you have any other suggestions?
Thank you very much and Happy New Year!
Lovespider

As I wrote before, getting php4+gd2 working is little bit magic. :( I spent too much time get it working. I don't think it is problem directly in gd, I think it is in some system library (png, z, ??) It is very hard to debug sometjing in php by this way :( Do you use debian ? Which version ? I solved this problem by reinstal almost everything to sarge version.

limo
05-01-2005, 09:28
Oh I see the map graphics now. But editing images.sql and setting the full path to the images did not work in first try. (I compiled zabbix in a subfolder of /root). I copied the png files in a directory in /tmp and set the path in images.sql to this directory. This worked for me fine.

I think there is problem with rights to mysql. As I found by strace, not client, but server parses command load_file() , so mysqld process has to be capable to read all this files even if you ar runing mysqlclient as root. On some system, there can be chroot enviroment or another restricting rules. I played with this on debian and I found temporary way how to import.. I copied all png files into mysql home directory (/var/lib/mysql) , imported them (without change in images.sql) and them removed png files. It is not clean but it worked for me. I think there is no clear way how to import images by load_file() to make it working everywhere. Maybe some small php script could help.. But this is writen from scratch. Please don't hurt me for this :)

if ($f=fopen("img.png")) {
$img=addslashes(fread($f,filesize("img.png")));
mysql_query("insert into images values ( ... ,'$img', ... )");
}

Lovespider
05-01-2005, 09:39
Hello,
I have Linux Debian 2.4.25 and after reinstalling all the gd libraries...voilą, none of the graphs works! I made a mess with all the libraries but now in the apache log I don't have any error.
I'll try to remove and compile manually the gd2 libraries instead of using apt-get...I'll let you know.
Lovespider

Lovespider
05-01-2005, 10:24
In my configuration, I solved reinstalling libraries AND adding into php.ini the following line:

extension=gd.so

Obviously without that library loaded, we cannot use the gd extensions...

Anyway, now I can see also the maps!!
Thanks to anyone who has given me support in this task.
Lovespider

bennethos
01-02-2005, 23:12
I also have debian, when I do a php -m I see gd is between the lines as well as mysql...

but i can't find the gd.so file :-/ ... I compiled php myself and it gave no errors(had to try lots of stuff to get gd included with the zlib dir etc... )

any idea's ?

forgot to mention that I did install the development files as well for gd

phpinfo() gives me :

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

pabloadmin
01-02-2005, 23:48
Hi,

I had the some problem in Debian, i used apt-get to install it and the problem was resolved.


Pablo

zixel
10-05-2006, 20:36
The problem I had is that the ImageCreateFromString($db_image["image"]); function in map.php was stopping the whole mapping process because I had not allocated enough script memory in php.ini (memory_limit=8M is default).

If you have this in your apache error.log then that's your problem:

[error] [client 10.100.0.128] PHP Fatal error: Allowed memory size of 8388608 bytes ex hausted (tried to allocate 843 bytes) in /var/www/html/map.php on line 95

Treitor
18-02-2008, 15:41
I have the same problem, the background image was broken.

In php.ini I change:

memory_limit = 8M
to
memory_limit = 16M

and now the background is OK.

Thank“s all.

Aly
21-02-2008, 16:16
With big graphs you will need at least 128M ;) due to GD2 lib