Ad Widget

Collapse

PATCH: Bulk Fixes / Changes For 1.1.6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jbothe
    Junior Member
    • Sep 2006
    • 10

    #31
    Since applying this patch, I receive various errors in my error_log:
    Code:
    PHP Notice:  Undefined variable:  is_numeric in /etc/zabbix/db.inc.php on line 97, referer: http://monitor2/zabbix/overview.php
    PHP Fatal error:  Call to undefined function:  () in /etc/zabbix/db.inc.php on line 97, referer: http://monitor2/zabbix/overview.php
    PHP Notice:  Undefined variable:  is_numeric in /etc/zabbix/db.inc.php on line 97, referer: http://monitor2/zabbix/actions.php
    PHP Fatal error:  Call to undefined function:  () in /etc/zabbix/db.inc.php on line 97, referer: http://monitor2/zabbix/actions.php
    PHP Notice:  Undefined variable:  is_numeric in /etc/zabbix/db.inc.php on line 97, referer: http://monitor2/zabbix/actions.php
    PHP Fatal error:  Call to undefined function:  () in /etc/zabbix/db.inc.php on line 97, referer: http://monitor2/zabbix/actions.php
    PHP Notice:  Undefined variable:  is_numeric in /etc/zabbix/db.inc.php on line 97, referer: http://monitor2/zabbix/actions.php
    PHP Fatal error:  Call to undefined function:  () in /etc/zabbix/db.inc.php on line 97, referer: http://monitor2/zabbix/actions.php
    PHP Notice:  Undefined variable:  is_numeric in /etc/zabbix/db.inc.php on line 97, referer: http://monitor2/zabbix/triggers.php?form=update&triggerid=12297&hostid=10009
    PHP Fatal error:  Call to undefined function:  () in /etc/zabbix/db.inc.php on line 97, referer: http://monitor2/zabbix/triggers.php?form=update&triggerid=12297&hostid=10009
    Suggestions?

    Comment

    • James Wells
      Senior Member
      • Jun 2005
      • 664

      #32
      Yeah, this is a bug that Palmer found. In the Frontend/php/include directory, you need to edit db.inc.php. There are two lines which look like;
      Code:
      if($is_numeric($offset))
      You need to remove the first dollar sign ($), so that they look like;
      Code:
      if(is_numeric($offset))
      I will be pushing out a new patch later today or tomorrow which fixes this issue as well as a few others that we have found at work. Sorry for the inconvenience.
      Unofficial Zabbix Developer

      Comment

      • jbothe
        Junior Member
        • Sep 2006
        • 10

        #33
        Originally posted by James Wells
        Sorry for the inconvenience.
        No worries. I appreciated all the extra effort being put into this project.

        I also had to comment out line 1032 in graph.inc.php as Palmer had mentioned. However, I continue to receive errors:
        Code:
        PHP Notice:  Undefined variable:  i in /usr/share/zabbix/include/classes/graph.inc.php on line 1236, referer: http://monitor2/zabbix/charts.php?groupid=0&hostid=0&graphid=11
        PHP Notice:  Undefined index:   in /usr/share/zabbix/include/classes/graph.inc.php on line 1236, referer: http://monitor2/zabbix/charts.php?groupid=0&hostid=0&graphid=11
        PHP Notice:  Undefined offset:  1172 in /usr/share/zabbix/include/classes/graph.inc.php on line 1236, referer: http://monitor2/zabbix/charts.php?groupid=0&hostid=0&graphid=11

        Comment

        • Palmertree
          Senior Member
          • Sep 2005
          • 746

          #34
          On or about line 1236 in file
          /zabbix/include/classes/graph.inc.php change items[$i]["drawtype"] to items[$item]["drawtype"]

          Code:
                                // For each metric
                                  for($item = 0; $item < $this->num; $item++)
                                  {
                                          if ($this->items[$item]["drawtype"] == GRAPH_DRAW_TYPE_NOT_DRAWN)
                                                  continue;

          Comment

          • Palmertree
            Senior Member
            • Sep 2005
            • 746

            #35
            I was getting the following error in the httpd logs:

            [Fri Mar 16 00:33:33 2007] [error] [client x.x.x.x] PHP Notice: Use of undefined constant hostid - assumed 'hostid' in /var/www/html/zabbix/include/forms.inc.php on line 565, referer: https://www.somesite.com/zabbix/items.php

            Changed url_param(hostid) to url_param("hostid") on or about line 565 in the forms.inc.php file. See below....

            Before:
            Code:
            frmRow = Array(
                                new CButton(
                                    "create_trigger",
                                    "Create trigger",
                                    "return Redirect('triggers.php?form=Create+Trigger" . url_param(hostid) .
                                        "&description=" . urlencode($description) .
                                        "&expression={" . urlencode($host) . ":" . urlencode($key) . "}" .
                                        "')"));
                            array_push($frmRow, new CButton("save",S_SAVE));
                            if(isset($_REQUEST["itemid"]))
            After:
            Code:
            frmRow = Array(
                                new CButton(
                                    "create_trigger",
                                    "Create trigger",
                                    "return Redirect('triggers.php?form=Create+Trigger" . url_param("hostid") .
                                        "&description=" . urlencode($description) .
                                        "&expression={" . urlencode($host) . ":" . urlencode($key) . "}" .
                                        "')"));
                            array_push($frmRow, new CButton("save",S_SAVE));
                            if(isset($_REQUEST["itemid"]))

            Comment

            • James Wells
              Senior Member
              • Jun 2005
              • 664

              #36
              I just posted 1.1.6.J. This patch adds more phpdoc components and includes fixes for the issues that Palmertree noted above, as well as corrected some bugs with auditing. I also merged in Dan Searle's trigger dependency patch.
              Unofficial Zabbix Developer

              Comment

              • tronite
                Senior Member
                • Jun 2007
                • 147

                #37
                Originally posted by James Wells
                Greetings,

                Attached is a bulk patch for 1.1.6. This patch adds new features, and bug fixes against Zabbix 1.1.6. Some of the other patches on the forums that are include in this are;
                To use this patch to it's fullest, against a populated Zabbix DB, you will need to execute the following MySQL (Or other commands for other DBs) commands;
                Code:
                alter table `items` change `key_` `key_` VARCHAR(255) NOT NULL;
                alter table config add ackduration int(4) DEFAULT '1800' NOT NULL;
                alter table alerts add ackuntil int(4) DEFAULT '0' NOT NULL;
                Additionally, to take advantage of the new improved Server Status, you will need to edit a new configuration file called server.inc.php, in the Zabbix UI include directory. This file contains a couple of new configuration entries that are used to gather status using native Zabbix tools. Please read the thread posted at PATCH: Improved Server Status In Reports for further details on using this patch.

                EDIT: 02 Mar 07 - Updated the patch to resolve issues found by Palmertree and some of my co-workers.

                EDIT: 08 Mar 07 -- Updated the patch, see what has changed

                EDIT: 14 Mar 07 -- Created add-on patch. This patch is meant to be applied over the existing bulk patch. See what has changed
                EDIT: 14 Mar 07 #2 -- I had a small typo in the patch G patch, you will need to add the H patch as well. Sorry for the inconvenience.
                EDIT: 17 Mar 07 -- Fixed the latest round of issues. I have also begun documenting classes and functions in the UI. The documentation, what there is of it anyway, can be viewed with phpdoc. My goal is to completely document the UI's functions and classes to ease the transition from 1.1.6 to 1.4 and or custom UI's.
                EDIT: 29 Mar 07 -- This patch is mostly adding more phpdoc components, however, there are a couple of minor bug fixes as well.
                I notice most of your threads make for hot threads, and although you might not care but one more post and you are a senior member.

                Comment

                • tronite
                  Senior Member
                  • Jun 2007
                  • 147

                  #38
                  Originally posted by jbothe
                  Since applying this patch, I receive various errors in my .php?form=update&triggerid=12297&hostid=10009
                  [/code]
                  Suggestions?

                  OOPS! Quoted the wrong person sorry James.

                  Comment

                  • richlv
                    Senior Member
                    Zabbix Certified Trainer
                    Zabbix Certified SpecialistZabbix Certified Professional
                    • Oct 2005
                    • 3112

                    #39
                    todo in wiki (http://www.zabbix.com/wiki/doku.php?id=todo:index) says "Review James patches".

                    what's the current status ?
                    Zabbix 3.0 Network Monitoring book

                    Comment

                    Working...