Ad Widget

Collapse

MAP now shown

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Lovespider
    Member
    • Sep 2004
    • 99

    #1

    MAP now shown

    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
    Member
    • Sep 2004
    • 99

    #2
    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

    Comment

    • Jabasf
      Junior Member
      • Nov 2004
      • 3

      #3
      No Icon on the map

      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 ?

      Comment

      • Alexei
        Founder, CEO
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2004
        • 5654

        #4
        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...
        Alexei Vladishev
        Creator of Zabbix, Product manager
        New York | Tokyo | Riga
        My Twitter

        Comment

        • Lovespider
          Member
          • Sep 2004
          • 99

          #5
          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

          Comment

          • limo
            Senior Member
            • Dec 2004
            • 192

            #6
            MAP not shown related to gd2

            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.

            Comment

            • Lovespider
              Member
              • Sep 2004
              • 99

              #7
              php4-gd2

              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
              Last edited by Lovespider; 04-01-2005, 17:59.

              Comment

              • Rudolf
                Member
                • Dec 2004
                • 90

                #8
                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.

                Comment

                • limo
                  Senior Member
                  • Dec 2004
                  • 192

                  #9
                  Not so easy to reinstall

                  Originally posted by Lovespider
                  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.

                  Comment

                  • limo
                    Senior Member
                    • Dec 2004
                    • 192

                    #10
                    rights to png files

                    Originally posted by Rudolf
                    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', ... )");
                    }

                    Comment

                    • Lovespider
                      Member
                      • Sep 2004
                      • 99

                      #11
                      Reinstall everything??

                      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

                      Comment

                      • Lovespider
                        Member
                        • Sep 2004
                        • 99

                        #12
                        Solved!

                        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

                        Comment

                        • bennethos
                          Member
                          • Jan 2005
                          • 31

                          #13
                          gd support

                          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
                          Last edited by bennethos; 01-02-2005, 23:31.

                          Comment

                          • pabloadmin
                            Member
                            Zabbix Certified Specialist
                            • Jan 2005
                            • 67

                            #14
                            Hi,

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


                            Pablo

                            Comment

                            • zixel
                              Junior Member
                              • Apr 2006
                              • 4

                              #15
                              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

                              Comment

                              Working...