TheCry
(Sascha Bay)
July 15, 2021, 5:10am
1
Good morning,
i’d upgraded ICINGA Web to 2.9.0
If i relogin with the switch “Remember me” i’d got the following error
#0 [internal function]: PDO->exec(String)
#1 /usr/share/icinga-php/ipl/vendor/ipl/sql/src/Connection.php(82): call_user_func_array(Array, Array)
#2 /usr/share/icinga-php/ipl/vendor/ipl/sql/src/Connection.php(164): ipl\Sql\Connection->__call(String, Array)
#3 /usr/share/icinga-php/ipl/vendor/ipl/sql/src/Connection.php(399): ipl\Sql\Connection->connect()
#4 /usr/share/icinga-php/ipl/vendor/ipl/sql/src/Connection.php(438): ipl\Sql\Connection->prepexec(String)
#5 /usr/share/php/Icinga/Web/RememberMe.php(231): ipl\Sql\Connection->insert(String, Array)
#6 /usr/share/icingaweb2/application/forms/Authentication/LoginForm.php(142): Icinga\Web\RememberMe->persist()
#7 /usr/share/php/Icinga/Web/Form.php(1178): Icinga\Forms\Authentication\LoginForm->onSuccess()
#8 /usr/share/icingaweb2/application/controllers/AuthenticationController.php(83): Icinga\Web\Form->handleRequest()
#9 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Controllers\AuthenticationController->loginAction()
#10 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch(String)
#11 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#12 /usr/share/php/Icinga/Application/Web.php(304): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#13 /usr/share/php/Icinga/Application/webrouter.php(107): Icinga\Application\Web->dispatch()
#14 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#15 {main}
If i press F5 the site works.
I’d added the added the database update https://github.com/Icinga/icingaweb2/blob/master/etc/schema/mysql-upgrades/2.9.0.sql
The same error appears if i click on the new link “manage-user-devices”
Our logins are checked against an LDAP.
Our system:
Debian 9
PHP 7.3
ICINGA lastest Release
ICINGA WEB 2.9.0
Regards
Sascha
Edit…
I’d fixed the issue by adding the charset “uft8” in the resources.ini
nilmerg
(Johannes Meyer)
July 15, 2021, 7:20am
2
Hi,
we have a similar issue on Github .
May I ask which database vendor and version this is with?
n_drew
(Nicholas Drew)
July 20, 2021, 12:31pm
4
I have this problem too and occurs only if i activate the “stay logged in” slider.
If I reload the page I can login and Icinga Web works perfectly
This is the databse used: mysql Ver 8.0.25-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))
SQLSTATE[42000]: Syntax error or access violation: 1115 Unknown character set: ''
#0 [internal function]: PDO->exec()
#1 /usr/share/icinga-php/ipl/vendor/ipl/sql/src/Connection.php(82): call_user_func_array()
#2 /usr/share/icinga-php/ipl/vendor/ipl/sql/src/Connection.php(164): ipl\Sql\Connection->__call()
#3 /usr/share/icinga-php/ipl/vendor/ipl/sql/src/Connection.php(399): ipl\Sql\Connection->connect()
#4 /usr/share/icinga-php/ipl/vendor/ipl/sql/src/Connection.php(438): ipl\Sql\Connection->prepexec()
#5 /usr/share/php/Icinga/Web/RememberMe.php(231): ipl\Sql\Connection->insert()
#6 /usr/share/icingaweb2/application/forms/Authentication/LoginForm.php(142): Icinga\Web\RememberMe->persist()
#7 /usr/share/php/Icinga/Web/Form.php(1178): Icinga\Forms\Authentication\LoginForm->onSuccess()
#8 /usr/share/icingaweb2/application/controllers/AuthenticationController.php(83): Icinga\Web\Form->handleRequest()
#9 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Controllers\AuthenticationController->loginAction()
#10 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch()
#11 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch()
#12 /usr/share/php/Icinga/Application/Web.php(304): Zend_Controller_Front->dispatch()
#13 /usr/share/php/Icinga/Application/webrouter.php(107): Icinga\Application\Web->dispatch()
#14 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#15 {main}
TheCry
(Sascha Bay)
July 20, 2021, 1:02pm
5
Did you import this SQL statement: https://github.com/Icinga/icingaweb2/blob/master/etc/schema/mysql-upgrades/2.9.0.sql
?
And you have to set in the file “/etc/icingaweb2/resources.ini”
charset = “utf8”
for the “icingaweb_db” connection.
I had also the sema problem.
I have changed the charset as suggested and restarted the services (I performed a reboot, instead)
But NOW, is I select “Stay logged in” in the login page…
After logged on I have another error:
SQLSTATE[42000]: Syntax error or access violation: 1142 INSERT command denied to user ‘icingaweb’@‘localhost’ for table ‘icingaweb_rememberme’
#0 /usr/share/icinga-php/ipl/vendor/ipl/sql/src/Connection.php(401): PDO->prepare(String)
#1 /usr/share/icinga-php/ipl/vendor/ipl/sql/src/Connection.php(438): ipl\Sql\Connection->prepexec(String)
#2 /usr/share/php/Icinga/Web/RememberMe.php(231): ipl\Sql\Connection->insert(String, Array)
#3 /usr/share/icingaweb2/application/forms/Authentication/LoginForm.php(142): Icinga\Web\RememberMe->persist()
#4 /usr/share/php/Icinga/Web/Form.php(1178): Icinga\Forms\Authentication\LoginForm->onSuccess()
#5 /usr/share/icingaweb2/application/controllers/AuthenticationController.php(83): Icinga\Web\Form->handleRequest()
#6 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Controllers\AuthenticationController->loginAction()
#7 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch(String)
#8 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#9 /usr/share/php/Icinga/Application/Web.php(304): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#10 /usr/share/php/Icinga/Application/webrouter.php(107): Icinga\Application\Web->dispatch()
#11 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#12 {main}
If I do not select “Stay logged in” flag, I have no problem at login.
P.
I have applied the sql that create the table as per your suggestions…
But If I selecr the new table just created I have this warning - and the error at login is not gone!
This last error is a PhpMyAdmin issue\bug.
A possible solution is reported here:
opened 08:59AM - 16 Nov 19 UTC
closed 09:02AM - 16 Nov 19 UTC
bug
duplicate
### Describe the bug
Each time I switch between tables in a list for a curren… t database I get a warning "Warning in ./libraries/sql.lib.php#613 count(): Parameter must be an array or an object that implements Countable"
### To Reproduce
Steps to reproduce the behavior:
1. Login to PMA as a database user
2. Choose any of your databases to expand a list of its tables
3. Click on any table to view its contents
4. See warning
### Expected behavior
An expected behavior is to see database table contents without any warnings
### Screenshots

### Server configuration
- Operating system: Linux Mint 19.2
- Web server: Apache 2.4.29
- Database version: 5.7.27
- PHP version: 7.2.24
- phpMyAdmin version: 4.6.6deb5
### Client configuration
- Browser: Mozilla Firefox
- Operating system: Linux Mint 19.2
### Additional context
The bug is in the line 613 of a file ./libraries/sql.lib.php
The closing bracket of a count() function is misplaced and should be located before the "==" operator.
What we have now:

How it should be:
