Icingaweb2 does not work with PHP 7.2

Bug #1769890 reported by Jon Gerdes
58
This bug affects 10 people
Affects Status Importance Assigned to Milestone
icingaweb2 (Ubuntu)
Fix Released
Medium
Unassigned
Bionic
Fix Released
Medium
Richard Laager

Bug Description

[Impact]
icingaweb2 does not work on PHP 7.2 or higher, e.g. as shipped in Ubuntu 18.04.

[Test Case]

Steps to reproduce:
$ sudo apt install mariadb-server
# mysql_secure_installation
$ sudo apt install icinga2 icinga2-ido-mysql
Yes to both questions relating to automatically set up database.
$ sudo apt install icingaweb2
Point a browser at http://localhost/icingaweb2/setup

Expected results:
The setup wizard loads.

Actual results:

Fatal error: Uncaught ErrorException: session_name(): Cannot change session name when session is active in /usr/share/php/Icinga/Web/Session/PhpSession.php:97 Stack trace: #0 [internal function]: Icinga\Application\ApplicationBootstrap->Icinga\Application\{closure}(2, 'session_name():...', '/usr/share/php/...', 97, Array) #1 /usr/share/php/Icinga/Web/Session/PhpSession.php(97): session_name('Icingaweb2') #2 /usr/share/php/Icinga/Web/Session/PhpSession.php(152): Icinga\Web\Session\PhpSession->open() #3 /usr/share/php/Icinga/Web/Controller/ActionController.php(544): Icinga\Web\Session\PhpSession->write() #4 /usr/share/php/Icinga/Web/Controller/ActionController.php(489): Icinga\Web\Controller\ActionController->shutdownSession() #5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(512): Icinga\Web\Controller\ActionController->postDispatch() #6 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch('errorAction') #7 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php( in /usr/share/icingaweb2/library/vendor/Zend/Controller/Plugin/Broker.php on line 332

[Regression Potential]
The package is completely broken for setup now, and IIRC, at least somewhat broken if you get past that somehow, so the regression potential is very low.

[Other Info]

Upstream fixes:
https://github.com/Icinga/icingaweb2/pull/3315/commits/dadd2c80f6819111f25e3799c072ec39c991897e
https://github.com/Icinga/icingaweb2/commit/72ec132f25c868d9510e6d36a2d5c92fc8dd59d1

Backported to Debian package here:
https://salsa.debian.org/nagios-team/pkg-icingaweb2/commit/5804954da6cf08a74eeeb689d8d094eefa6ba9bc

Revision history for this message
Bas Couwenberg (sebastic) wrote :
tags: added: bionic
Revision history for this message
Jon Gerdes (gerdesj) wrote :

I have manually patched my install and that works for me.

There is another error now:

Fatal error: Declaration of Icinga\Web\Form\Element\Note::isValid($value) must be compatible with Zend_Form_Element::isValid($value, $context = NULL) in /usr/share/php/Icinga/Web/Form/Element/Note.php on line 0

This is fixed upstream here: https://github.com/Icinga/icingaweb2/blob/master/library/Icinga/Web/Form/Element/Note.php

--- public function isValid($value)
+++ public function isValid($value, $context = null)

After doing that I can run the setup wizard to completion.

Revision history for this message
Michael PEak (mikecpeak) wrote :

I'm having the same issue. Will patch my installation, also. Thanks!

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

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

Changed in icingaweb2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Patrick Hetu (patrick-hetu) wrote :
Revision history for this message
dundir (dundir) wrote :

The bugfix was merged upstream: https://github.com/Icinga/icingaweb2/pull/3315

Ubuntu repo packages just need to be updated to include the fix, I can confirm this is an outstanding issue with Ubuntu 18.04.3 LTS.

Revision history for this message
ALU (c-launchpadmail) wrote :

Can confirm in Jan 2020, still an issue with Ubuntu 18.04.3

Fixed by following changes in

https://github.com/Icinga/icingaweb2/pull/3315/commits/dadd2c80f6819111f25e3799c072ec39c991897e

and John Gerde's note above.

What's the best way to help move this into a release for 18.04?

Richard Laager (rlaager)
Changed in icingaweb2 (Ubuntu):
status: Confirmed → Fix Released
description: updated
Richard Laager (rlaager)
description: updated
description: updated
Richard Laager (rlaager)
Changed in icingaweb2 (Ubuntu Bionic):
status: New → In Progress
assignee: nobody → Richard Laager (rlaager)
Richard Laager (rlaager)
description: updated
Revision history for this message
Richard Laager (rlaager) wrote :

New debdiff attached.

description: updated
Mathew Hodson (mhodson)
Changed in icingaweb2 (Ubuntu):
importance: Undecided → Medium
Changed in icingaweb2 (Ubuntu Bionic):
importance: Undecided → Medium
Mathew Hodson (mhodson)
tags: added: patch
Revision history for this message
Simon Quigley (tsimonq2) wrote :

Hi Richard! Apologies for the delay in reviewing your debdiff.

This has been uploaded to Bionic and it is waiting in the queue now. I did not find any changes that needed to be made.

Unsubscribing ~ubuntu-sponsors, please resubscribe us if there is anything else to sponsor.

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Jon, or anyone else affected,

Accepted icingaweb2 into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/icingaweb2/2.4.1-1ubuntu0.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 on 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, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in icingaweb2 (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Brian Murray (brian-murray) wrote : [icingaweb2/bionic] verification still needed

The fix for this bug has been awaiting testing feedback in the -proposed repository for bionic for more than 90 days. Please test this fix and update the bug appropriately with the results. In the event that the fix for this bug is still not verified 15 days from now, the package will be removed from the -proposed repository.

tags: added: removal-candidate
Revision history for this message
Jon Gerdes (gerdesj) wrote :

I installed a Bionic VM with the minimal .iso. Followed my steps to reproduce this fault and got the error in my browser. I then properly read Brian's instructions on how to use "proposed" and now get the Icinga web 2 setup wizard in my browser.

I'll keep the VM around for a few weeks if you need anything more testing.

Thanks for fixing the bug.

Mathew Hodson (mhodson)
tags: added: verification-done-bionic
removed: removal-candidate verification-needed verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package icingaweb2 - 2.4.1-1ubuntu0.1

---------------
icingaweb2 (2.4.1-1ubuntu0.1) bionic; urgency=medium

  * Backport "Correct interfaces to conform to PHP 7.2+" (72ec132f) from
    upstream and `quilt refresh` it to apply without fuzz.
  * Backport "Add upstream patch for PHP 7.2 support." from 2.6.2-3
    (LP: #1769890). Thanks Bas Couwenberg <email address hidden>.

 -- Richard Laager <email address hidden> Wed, 08 Jan 2020 18:53:31 -0600

Changed in icingaweb2 (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for icingaweb2 has completed successfully and the package is now being 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.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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