← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1662027] Re: cacti vs PHP 7 vs split

 

This bug was fixed in the package cacti - 0.8.8h+ds1-8ubuntu0.1

---------------
cacti (0.8.8h+ds1-8ubuntu0.1) zesty; urgency=medium

  * debian/patches/enable_faster_polling_than_cron.patch: split() is
    deprecated in PHP 7, causing the code to fail.  Closes: #860271,
    LP: #1662027. Thanks to Paul Gevers <elbrus@xxxxxxxxxx>.

 -- Nishanth Aravamudan <nish.aravamudan@xxxxxxxxxxxxx>  Fri, 14 Apr
2017 21:26:51 -0700

** Changed in: cacti (Ubuntu Artful)
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1662027

Title:
  cacti vs PHP 7 vs split

Status in cacti package in Ubuntu:
  Fix Released
Status in cacti source package in Xenial:
  Fix Committed
Status in cacti source package in Yakkety:
  Fix Committed
Status in cacti source package in Zesty:
  Fix Committed
Status in cacti source package in Artful:
  Fix Released
Status in cacti package in Debian:
  Fix Released

Bug description:
  [Impact]

   * If the administrator configures cacti to poll data at a higher frequency
  than the cron job that runs the poller, a fatal error is emitted.

   * As the highest cron frequency is once per minute, one will have to
  use this feature if higher resolution is required.

  [Test Case]

   * On the one hand, this is a syntactical (non-php7.0 compliant) code
  change, so the test case feels less necessary.

   * On the other hand, one can configure cacti to poll at a higher than
  once-per-minute frequency, and the poller will crash with the
  "undefined function split()".

  [Regression Potential]

   * Presuming an administrator does not use a higher than one-minute
  polling frequency, there is no regression potential, as they are
  unaffected by this codepath.

   * If the administrator does use a higher polling frequency, they may
  have already hit this bug and manually changed the source on their
  system. Ideally, they will have changed it in the same way upstream
  has, which is the backported fix in this bug -- and so when the update
  is installed, there should be no change.

   * If the administrator left cacti in the broken state because of this
  bug, then it will be fixed by this change and there again, is no
  regression potential, because the feature was broken before.

  ---

  poller.php calls split in two places, which fails with PHP 7.  This
  seems to only actually cause problems if poller.php is configured to
  poll the snmp data sources more than once per time poller.php is
  called by cron (which typically happens if 10 second or 30 second
  polling intervals are requested), but it appears to me that these
  error messages may appear in the logs even when cacti is configured to
  only poll once per time it is called by cron.

  It appears that using explode instead of split is the fix.

  PHP Fatal error:  Uncaught Error: Call to undefined function split() in /usr/share/cacti/site/poller.php:454
  Stack trace:
  #0 {main}
    thrown in /usr/share/cacti/site/poller.php on line 454
  PHP Fatal error:  Uncaught Error: Call to undefined function split() in /usr/share/cacti/site/poller.php:454
  Stack trace:
  #0 {main}
    thrown in /usr/share/cacti/site/poller.php on line 454

  Description:    Ubuntu 16.04.1 LTS
  Release:        16.04
  cacti:
    Installed: 0.8.8f+ds1-4ubuntu4.16.04.1
    Candidate: 0.8.8f+ds1-4ubuntu4.16.04.1
    Version table:
   *** 0.8.8f+ds1-4ubuntu4.16.04.1 500
          500 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
          500 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages
          100 /var/lib/dpkg/status
       0.8.8f+ds1-4ubuntu4 500
          500 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
          500 http://us.archive.ubuntu.com/ubuntu xenial/universe i386 Packages

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cacti/+bug/1662027/+subscriptions