Open rootwheel opened 2 years ago
We have the same issue.
Error: (0) Trying to access array offset on value of type bool
URL: /nagvis/frontend/nagvis-js/index.php
File: /usr/local/nagvis/share/server/core/classes/CoreAuthorisationModPDO.php
Line: 263
#0 /usr/local/nagvis/share/server/core/classes/CoreAuthorisationModPDO.php(263): nagvisExceptionErrorHandler()
#1 /usr/local/nagvis/share/server/core/classes/CoreAuthorisationModPDO.php(233): CoreAuthorisationModPDO->getUserId()
#2 /usr/local/nagvis/share/server/core/classes/CoreAuthorisationHandler.php(235): CoreAuthorisationModPDO->parsePermissions()
#3 /usr/local/nagvis/share/server/core/classes/CoreLogonModule.php(36): CoreAuthorisationHandler->parsePermissions()
#4 /usr/local/nagvis/share/server/core/classes/CoreLogonModule.php(46): CoreLogonModule->createUser()
#5 /usr/local/nagvis/share/server/core/classes/CoreLogonEnv.php(46): CoreLogonModule->verifyUserExists()
#6 /usr/local/nagvis/share/server/core/functions/index.php(56): CoreLogonEnv->check()
#7 /usr/local/nagvis/share/frontend/nagvis-js/index.php(53): require('...')
#8 {main}
CentOS 8 / CentOS Stream PHP 8.0.13 NagVis 1.9.27
I solved the issue with somme googleing. I have no experience with PHP, so I don´t know how and why it´s working with that.
I just changed the code in line 263 in the file /usr/share/nagvis/share/server/core/classes/CoreAuthorisationModPDO.php from:
return intval($ret['userId'];
to
return intval($ret['userId']??='default value');
Not using the PDO, can not support you with this issue. Have had a quick look, but did not spot an obvious issue. Would need some debugging.
Hello! I faced an issue then adding user to auth.db with LDAP and Nagios credentials. A user is added successfully, but he has no role (role is empty). The related section in nagvis.ini.php is present
Debian 11 PHP 7.4 Full error message:
Thank you!