Ad Widget

Collapse

Can't access Graphs configuration after migrating from 1.4.1 to 1.4.2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dsipe
    Senior Member
    • Oct 2006
    • 184

    #1

    Can't access Graphs configuration after migrating from 1.4.1 to 1.4.2

    I've got the following error when clicking on the link Configuration->Graphs

    * Error in query [select distinct g.* from graphs g left join graphs_items gi on g.graphid=gi.graphid left join items i on gi.itemid=i.itemid while (g.graphid div 100000000000000) in (0) and ( i.hostid not in (-1) OR i.hostid is NULL ) order by g.name, g.graphid] [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'while (g.graphid div 100000000000000) in (0) and ( i.hostid not in (-1) OR i.' at line 1]
    * mysql_fetch_array(): supplied argument is not a valid MySQL result resource[/srv/www/htdocs/zabbix/include/db.inc.php:411]


    What's wrong ??

    nb: i don't make any change to the database schema when migrating to 1.4.2, hoping that nothing has changed
  • pixelplumber
    Junior Member
    • Aug 2007
    • 3

    #2
    I second this problem. I get the same issue with a fresh install of 1.4.2

    Comment

    • dsipe
      Senior Member
      • Oct 2006
      • 184

      #3
      More info on the problem:

      In fact, the problem come ONLY with filters Group->ALL and Host->ALL

      If you select a group, or a host, no errors!

      Comment

      • pixelplumber
        Junior Member
        • Aug 2007
        • 3

        #4
        ahhhh....... same again with a fresh install too. (I thought I was going crazy there for a minute thinking it had fixed itself)

        Comment

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

          #5
          Sorry, it is a typo in the SQL statement, 'while'=>'where'. It was fixed yesterday in SVN code.
          Alexei Vladishev
          Creator of Zabbix, Product manager
          New York | Tokyo | Riga
          My Twitter

          Comment

          • dsipe
            Senior Member
            • Oct 2006
            • 184

            #6
            ok!
            can you tell us which file to modify please ?

            Comment

            • jkoyle
              Junior Member
              • Aug 2007
              • 5

              #7
              Graphs Fix

              Edit the top level graphs.php line 348.

              Change the while statement to where like this:

              $result = DBselect("select distinct g.* from graphs g left join graphs_items gi on g.graphid=gi.graphid ".
              " left join items i on gi.itemid=i.itemid ".
              ' where '.DBin_node('g.graphid').
              " and ( i.hostid not in (".$denyed_hosts.") OR i.hostid is NULL )".
              " order by g.name, g.graphid");

              Comment

              Working...