Zabbix Frontend fails install with PHP7.0 due to always_populate_raw_post_data configuration

Bug #1572841 reported by ironstorm
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
zabbix (Ubuntu)
Fix Released
High
Unassigned
Xenial
Fix Released
High
Nish Aravamudan

Bug Description

[Impact]

 * The zabbix web frontend has one incompatibility and some missing dependencies with PHP7.0.

 * End-users are unable to use the web-frontend due to these issues.

[Test Case]

 * Install zabbix-frontend-php. Without the fix, the frontend will not load properly. With the fix, it will.

[Regression Potential]

 * The code change is identical to the upstream change; given that the frontend won't load with the code as-is, I believe there is no regression potential there.

 * The dependency changes allow for the web frontend to work properly without extra packages needing to be manually installed by end-users. Again, no chance for regression.

---

always_populate_raw_post_data was deprecated in PHP 5.3 at which time zabbix frontend setup began to insist that it be set to always_populate_raw_post_data = -1 in the PHP.ini

In PHP 7.0, which Ubuntu 16.04 LTS ships with, always_populate_raw_post_data has been removed completely. Due to this PHP frontend setup gets stuck on always_populate_raw_post_data not being disabled.

The solution is to apply the following patch to the PHP frontend code to ignore PHP 7.0:

--- /usr/share/zabbix/include/classes/setup/CFrontendSetup.php 2016-04-21 01:06:25.603388814 -0400
+++ /usr/share/zabbix/include/classes/setup/CFrontendSetup.php 2016-04-21 01:06:59.980485531 -0400
@@ -72,7 +72,7 @@
                }

                // check for deprecated PHP 5.6.0 option 'always_populate_raw_post_data'
- if (version_compare(PHP_VERSION, '5.6', '>=')) {
+ if (version_compare(PHP_VERSION, '5.6', '>=') && version_compare(PHP_VERSION, '7.0', '<') ) {
                        $result[] = $this->checkPhpAlwaysPopulateRawPostData();
                }
                $result[] = $this->checkPhpSockets();

Revision history for this message
ironstorm (ironstorm-gmail) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Ignore removed flag always_populate_raw_post_data for versions of PHP > 7.0" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in zabbix (Ubuntu):
status: New → Confirmed
Revision history for this message
Nish Aravamudan (nacc) wrote :

This has been fixed in the 16.10 version (1:3.0.3+dfsg-1) as the upstream fix went in 3.0.2-rc1.

Changed in zabbix (Ubuntu):
status: Confirmed → Fix Released
Nish Aravamudan (nacc)
Changed in zabbix (Ubuntu):
assignee: nobody → Nish Aravamudan (nacc)
Revision history for this message
Nish Aravamudan (nacc) wrote :

I have pushed a test build to: https://launchpad.net/~nacc/+archive/ubuntu/zabbix.

Please test the version there (2.4.7+dfsg-2ubuntu3~ppa1), if you are affected. This should install the correct dependencies and avoid the issue in bug 1572841 for the web frontend.

Mathew Hodson (mhodson)
Changed in zabbix (Ubuntu):
importance: Undecided → High
Mathew Hodson (mhodson)
tags: added: php7
Mathew Hodson (mhodson)
Changed in zabbix (Ubuntu Xenial):
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in zabbix (Ubuntu Xenial):
status: New → Confirmed
Nish Aravamudan (nacc)
Changed in zabbix (Ubuntu):
assignee: Nish Aravamudan (nacc) → nobody
Changed in zabbix (Ubuntu Xenial):
assignee: nobody → Nish Aravamudan (nacc)
status: Confirmed → In Progress
description: updated
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello ironstorm, or anyone else affected,

Accepted zabbix into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/zabbix/1:2.4.7+dfsg-2ubuntu2.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in zabbix (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Nish Aravamudan (nacc) wrote :

Verified on 2.4.7+dfsg-2ubuntu2.1

tags: added: verification-done
removed: verification-needed
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for zabbix has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zabbix - 1:2.4.7+dfsg-2ubuntu2.1

---------------
zabbix (1:2.4.7+dfsg-2ubuntu2.1) xenial; urgency=medium

  * d/control: add dependencies on split-out PHP7 packages (bcmath,
    mbstring, xml) needed by web frontend (LP: #1571534, .
  * debian/patches/always_populate_raw_post_data_not_in_php7.patch:
    Backport '[ZBX-9659] changed setup condition for checking
    always_populate_raw_post_data'. Closes LP: #1572841.

 -- Nishanth Aravamudan <email address hidden> Mon, 27 Jun 2016 17:03:29 -0700

Changed in zabbix (Ubuntu Xenial):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.