Ad Widget

Collapse

Zabbix 1.5 - Custom Graphs Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Palmertree
    Senior Member
    • Sep 2005
    • 746

    #1

    Zabbix 1.5 - Custom Graphs Problem

    Getting the following error when trying to modify an existing graph:


    Only variables should be passed by reference[/var/www/html/zabbix/include/graphs.inc.php:458]
  • Palmertree
    Senior Member
    • Sep 2005
    • 746

    #2
    Is anyone else having problems selecting Graph items when creating a new Graph? I get a pop up screen that says waiting for host in the browser status bar but the items are never displayed.

    Comment

    • NOB
      Senior Member
      Zabbix Certified Specialist
      • Mar 2007
      • 469

      #3
      Originally posted by Palmertree
      Getting the following error when trying to modify an existing graph:


      Only variables should be passed by reference[/var/www/html/zabbix/include/graphs.inc.php:458]
      It happened to me, too.

      But it doesn't seem to do any (visible) harm using R5512.
      The graph is created and the values are shown.

      Regards

      Norbert.

      Comment

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

        #4
        I think it is already fixed in the very latest code. Please report if you still have these errors.
        Alexei Vladishev
        Creator of Zabbix, Product manager
        New York | Tokyo | Riga
        My Twitter

        Comment

        • Palmertree
          Senior Member
          • Sep 2005
          • 746

          #5
          Downloaded the latest trunk and the following error still comes up when saving a custom graph:
          Only variables should be passed by reference[/var/www/html/zabbix/include/graphs.inc.php:384]

          I will take a look at the code to see if I can find anything. :-)

          Comment

          • Aly
            ZABBIX developer
            • May 2007
            • 1126

            #6
            Just remove symbols "&" before function names in hosts.inc.php.
            I just committed thous changes in svn. Should help
            Zabbix | ex GUI developer

            Comment

            • Palmertree
              Senior Member
              • Sep 2005
              • 746

              #7
              Thanks for the quick reply. Trying it now. I will let you know how testing works out.

              Comment

              • Palmertree
                Senior Member
                • Sep 2005
                • 746

                #8
                Tried latest trunk. Error still exist.

                Comment

                • Aly
                  ZABBIX developer
                  • May 2007
                  • 1126

                  #9
                  It's hard to fix if I don't get such error So please provide more info, like revision and line numbers.
                  Zabbix | ex GUI developer

                  Comment

                  • Palmertree
                    Senior Member
                    • Sep 2005
                    • 746

                    #10
                    Aly, it is still happening on line number 384 in graphs.inc.php. It only happens when I create a new graph and when it click on save. How can I tell what revision number is running?

                    Only variables should be passed by reference[/var/www/html/zabbix/include/graphs.inc.php:384]

                    Comment

                    • Palmertree
                      Senior Member
                      • Sep 2005
                      • 746

                      #11
                      Not sure if this will help but I highlighted the section which is saying there is an error on in the graphs.inc.php file:

                      Code:
                       if ( $result )
                                      {
                                              info('Graph "'.$name.'" added to hosts '.implode(',',$host_list));
                      
                                              /* add graphs for child hosts */
                      
                                              $[COLOR="Red"]host = DBfetch(get_hosts_by_graphid($graphid));[/COLOR]
                      
                                              $chd_hosts = get_hosts_by_templateid($host['hostid']);
                                              while($chd_host = DBfetch($chd_hosts))
                                              {
                                                      copy_graph_to_host($graphid, $chd_host['hostid'], false);
                                              }
                                      }

                      Comment

                      • Palmertree
                        Senior Member
                        • Sep 2005
                        • 746

                        #12
                        Looks like variables by reference changed from PHP versions 4 to 5 according to this article:

                        Comment

                        • Aly
                          ZABBIX developer
                          • May 2007
                          • 1126

                          #13
                          I think I found the problem, the fix have been committed to svn. rev 5526

                          P.S. when you enter "svn update", doesn't it show revision number?
                          P.S.S. Yes you are correct about source of this error.
                          Last edited by Aly; 25-03-2008, 17:16.
                          Zabbix | ex GUI developer

                          Comment

                          • Palmertree
                            Senior Member
                            • Sep 2005
                            • 746

                            #14
                            I am using TortoiseSVN. There is probably a gui click that will tell me the revision. I will find out.

                            Trying latest trunk version now. I will let you know here shortly (10 mins or so) how testing turns out.

                            Also, thanks again.

                            Comment

                            • Palmertree
                              Senior Member
                              • Sep 2005
                              • 746

                              #15
                              Yikes. Revision number is right in front me. :-) Downloading and testing trunk version 5524.

                              Comment

                              Working...