Ad Widget

Collapse

"the image cannot be displayed, because it contains errors"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • imonteirov
    Junior Member
    • Nov 2006
    • 15

    #1

    "the image cannot be displayed, because it contains errors"

    Hi,

    I've just installed ZABBIX 1.1.4 by SIA Zabbix and when I try to display a graph directly from Graph I get a broken image path. When I get the image source link and display it in a different window I get:

    The image “http://localhost/chart.php?itemid=1...m=0&width=1172” cannot be displayed, because it contains errors.

    I use Suse 10.1, php 4.4.4 , apache 2, php 4.4.4 updated for support php gd and added extension=gd.so line in php.ini .

    Regards,
  • just2blue4u
    Senior Member
    • Apr 2006
    • 347

    #2
    In most cases, your php module doesn't get enough RAM to build the graph.

    modify your /etc/php.ini :
    set "memory_limit = 64M" or something lower / higher (depending on how much total RAM you have an what else the Server has to do).
    That should do it!

    PS: Don't forget to restart apache!
    Big ZABBIX is watching you!
    (... and my 48 hosts, 4513 items, 1280 triggers via zabbix v1.6 on CentOS 5.0)

    Comment

    • imonteirov
      Junior Member
      • Nov 2006
      • 15

      #3
      My GD is not correct.
      GD + php are installed also compiled the apache. I configured php.ini with your references. But it does'nt function.
      I am testing in the following code too:
      <?php
      header("Content-type: image/png");
      $string = $_GET['text'];
      $im = imagecreatefrompng("images/button1.png");
      $orange = imagecolorallocate($im, 220, 210, 60);
      $px = (imagesx($im) - 7.5 * strlen($string)) / 2;
      imagestring($im, 3, $px, 9, $string, $orange);
      imagepng($im);
      imagedestroy($im);
      ?>

      And zabbix Graphics.

      versions: gd-2.0.33 10.1, php 4.4.4 , apache 2.

      What's happend..?
      Last edited by imonteirov; 06-12-2006, 20:09.

      Comment

      • imonteirov
        Junior Member
        • Nov 2006
        • 15

        #4
        It's ok. I make uninstall and install all applications. Apache at Yast and rm -rf (!!!), PHP and GD.
        My phpinfo() :
        './configure' '--with-mysql-dir=/usr/local/mysql' '--with-gd=/home/ivieira/Desktop/downloads/php-4.4.4/ext/gd/libgd/' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-zlib-dir=/usr/lib/' '--with-png-dir=/usr/lib/' '--enable-track-vars'
        Thank you, !!!

        Comment

        • tmatheson
          Junior Member
          • Jan 2007
          • 1

          #5
          &quot;the image cannot be displayed, because it contains errors&quot;

          Ok first you need to have the file you are calling images/button1.png in the images directory in your case localhost/images/button1.png and second you are not passing any get params in your url but you call them in your "copied" script.
          You are calling $_GET['text'] but I dont see it in the url. Please make sure these are correct.

          Best,

          Tim Matheson

          Comment

          • roiy
            Junior Member
            • Dec 2006
            • 2

            #6
            All Works Fine But ...

            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 ?

            any info i can post here will b.

            ciao,

            TMWTP
            Last edited by roiy; 10-01-2007, 22:00.

            Comment

            • Tarick
              Junior Member
              • Oct 2007
              • 5

              #7
              Look at /etc/zabbix/zabbix.conf.php.
              If there is something like:

              Code:
              #This file is place-holder, bla-bla-bla
              delete those comments.

              If not, download broken image with curl or wget and look in its content.
              Last edited by Tarick; 23-10-2007, 15:15.

              Comment

              • raghaven.kumar
                Member
                • Mar 2008
                • 34

                #8
                Originally posted by Tarick
                Look at /etc/zabbix/zabbix.conf.php.
                If there is something like:

                Code:
                #This file is place-holder, bla-bla-bla
                delete those comments.

                If not, download broken image with curl or wget and look in its content.
                Yo Thanks Man
                it works cool

                Comment

                • bluecaeda
                  Junior Member
                  • Jun 2008
                  • 1

                  #9
                  &quot;the image cannot be displayed, because it contains errors&quot;

                  Hi,

                  I tried to do as advised but still not able to see the graphic???

                  - Tried to delete the "#This file is place-holder...", but on the screen, the wordings still visible... and also no go on the graphic.

                  - increased the memory to 128MB and still no go.

                  Would reinstalling PHP, Apache and Zabbix manually help? Cos am using yum package.

                  Comment

                  Working...