Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using php7.2 fails with icingaweb2 #3428

Closed
paladox opened this issue Apr 25, 2018 · 8 comments
Closed

Using php7.2 fails with icingaweb2 #3428

paladox opened this issue Apr 25, 2018 · 8 comments

Comments

@paladox
Copy link

paladox commented Apr 25, 2018

Hi, when using php7.2 with icingaweb2 i am getting

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

Expected Behavior

Php7.2 to work (on /setup)

Current Behavior

when going to /setup it is failing with:

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

Same for logging in.

Possible Solution

Steps to Reproduce (for bugs)

  1. install php7.2
  2. go to /setup

Context

it is not allowing me to setup.

Your Environment

  • Icinga Web 2 version and modules (System - About): 2.4.1-1
  • Version used (icinga2 --version): r2.6.0-1
  • Operating System and version: debian 9.4
  • Enabled features (icinga2 feature list):
  • Config validation (icinga2 daemon -C):
  • If you run multiple Icinga 2 instances, the zones.conf file (or icinga2 object list --type Endpoint and icinga2 object list --type Zone) from all affected nodes.
@paladox
Copy link
Author

paladox commented Apr 25, 2018

When i cross out "session_name($this->sessionName);" in /usr/share/php/Icinga/Web/Session/PhpSession.php i then get

Fatal error: Uncaught ErrorException: ini_set(): A session is active. You cannot change the session module's ini settings at this time in /usr/share/php/Icinga/Web/Session/PhpSession.php:101 Stack trace: #0 [internal function]: Icinga\Application\ApplicationBootstrap->Icinga\Application\{closure}(2, 'ini_set(): A se...', '/usr/share/php/...', 101, Array) #1 /usr/share/php/Icinga/Web/Session/PhpSession.php(101): ini_set('session.use_coo...', '') #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/ in /usr/share/icingaweb2/library/vendor/Zend/Controller/Plugin/Broker.php on line 332

@paladox
Copy link
Author

paladox commented Apr 25, 2018

Doing

if(!isset($_SESSION)){
session_name($this->sessionName);
}

at least got me to go to which also fails:

screen shot 2018-04-25 at 23 07 06

@paladox
Copy link
Author

paladox commented Apr 25, 2018

Ah found the other fix 72ec132

Could that be backported to 2.4.1 please? and update the debian package please?

https://packages.debian.org/stretch/icingaweb2

@paladox
Copy link
Author

paladox commented Apr 25, 2018

Could this 5d10077 also be backported please?

@dnsmichi
Copy link
Contributor

We don't maintain Debian upstream packages. You can grab and install the official release packages from packages.icinga.com ... 2.5.2 should be available soon.

Cheers,
Michael

@nilmerg
Copy link
Member

nilmerg commented Apr 26, 2018

5d10077 is scheduled for v2.6.0. v2.5.2 is already out.

Closed as duplicate of #3185.

@nilmerg nilmerg closed this as completed Apr 26, 2018
@sledz
Copy link

sledz commented Oct 23, 2018

I see the same error with openSUSE Leap 15.0 and up-to-date versions of all components.

A new bug?

icinga2 --version
icinga2 - The Icinga 2 network monitoring daemon (version: r2.10.1-1)

Copyright (c) 2012-2018 Icinga Development Team (https://icinga.com/)
License GPLv2+: GNU GPL version 2 or later http://gnu.org/licenses/gpl2.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

System information:
Platform: openSUSE Leap
Platform version: 15.0
Kernel: Linux
Kernel version: 4.12.14-lp150.12.22-default
Architecture: x86_64

Build information:
Compiler: GNU 7.3.1
Build host: unknown

Application information:

General paths:
Config directory: /etc/icinga2
Data directory: /var/lib/icinga2
Log directory: /var/log/icinga2
Cache directory: /var/cache/icinga2
Spool directory: /var/spool/icinga2
Run directory: /run/icinga2

Old paths (deprecated):
Installation root: /usr
Sysconf directory: /etc
Run directory (base): /run
Local state directory: /var

Internal paths:
Package data directory: /usr/share/icinga2
State path: /var/lib/icinga2/icinga2.state
Modified attributes path: /var/lib/icinga2/modified-attributes.conf
Objects path: /var/cache/icinga2/icinga2.debug
Vars path: /var/cache/icinga2/icinga2.vars
PID path: /run/icinga2/icinga2.pid

icinga2 feature list
Disabled features: command compatlog debuglog elasticsearch gelf graphite influxdb livestatus opentsdb perfdata statusdata syslog
Enabled features: api checker ido-mysql mainlog notification

icinga2 daemon -C
[2018-10-23 12:10:19 +0200] information/cli: Icinga application loader (version: r2.10.1-1)
[2018-10-23 12:10:19 +0200] information/cli: Loading configuration file(s).
[2018-10-23 12:10:19 +0200] information/ConfigItem: Committing config item(s).
[2018-10-23 12:10:19 +0200] information/ApiListener: My API identity: netmoni.internal.dresearch-fe.de
[2018-10-23 12:10:19 +0200] information/ConfigItem: Instantiated 1 ScheduledDowntime.
[2018-10-23 12:10:19 +0200] information/ConfigItem: Instantiated 11 Services.
[2018-10-23 12:10:19 +0200] information/ConfigItem: Instantiated 1 IcingaApplication.
[2018-10-23 12:10:19 +0200] information/ConfigItem: Instantiated 1 Host.
[2018-10-23 12:10:19 +0200] information/ConfigItem: Instantiated 1 FileLogger.
[2018-10-23 12:10:19 +0200] information/ConfigItem: Instantiated 2 NotificationCommands.
[2018-10-23 12:10:19 +0200] information/ConfigItem: Instantiated 12 Notifications.
[2018-10-23 12:10:19 +0200] information/ConfigItem: Instantiated 1 NotificationComponent.
[2018-10-23 12:10:19 +0200] information/ConfigItem: Instantiated 2 HostGroups.
[2018-10-23 12:10:19 +0200] information/ConfigItem: Instantiated 1 ApiListener.
[2018-10-23 12:10:19 +0200] information/ConfigItem: Instantiated 1 Downtime.
[2018-10-23 12:10:19 +0200] information/ConfigItem: Instantiated 1 CheckerComponent.
[2018-10-23 12:10:19 +0200] information/ConfigItem: Instantiated 3 Zones.
[2018-10-23 12:10:19 +0200] information/ConfigItem: Instantiated 1 Endpoint.
[2018-10-23 12:10:19 +0200] information/ConfigItem: Instantiated 2 ApiUsers.
[2018-10-23 12:10:19 +0200] information/ConfigItem: Instantiated 1 User.
[2018-10-23 12:10:19 +0200] information/ConfigItem: Instantiated 1 IdoMysqlConnection.
[2018-10-23 12:10:19 +0200] information/ConfigItem: Instantiated 215 CheckCommands.
[2018-10-23 12:10:19 +0200] information/ConfigItem: Instantiated 1 UserGroup.
[2018-10-23 12:10:19 +0200] information/ConfigItem: Instantiated 3 ServiceGroups.
[2018-10-23 12:10:19 +0200] information/ConfigItem: Instantiated 3 TimePeriods.
[2018-10-23 12:10:19 +0200] information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars'
[2018-10-23 12:10:19 +0200] information/cli: Finished validating the configuration file(s).

rpm -q -i icinga2 icingaweb2 php7
Name : icinga2
Version : 2.10.1
...
Name : icingaweb2
Version : 2.5.3
...
Name : php7
Version : 7.2.5
...

@kajalrani01
Copy link

ANy solution for this?

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants