I have a vanilla install of the latest NagiosQL version, 3.40, on my Centos 7.5 server with PHP 7.2 (remi) and MariaDB 5.5 installed. Nagios is installed alongside and working normally, the MariaDB is functioning properly
I can complete the NagiosQL installation with all green ticks, however clicking the login button on the login page does nothing. I have checked and am using the correct credentials. Each click generates the following error message in the apache logs:
PHP Warning: mysqli_close() expects parameter 1 to be mysqli, null given in /usr/local/nagios/share/webadmin/functions/MysqliDbClass.php on line 409, referer: https://nagios/nagios/webadmin/index.php
Do you have an guidance on how best to troubleshoot this?
Happy to provide any additional details as required, the following PHP packages are installed
I belieive mysqli functionality is enabled by the php72-php-mysqlnd-7.2.13-2.el7.remi.x86_64 package. The installation completed successfully I assume using mysqli to connect?
Output of the command below
[root@nagios etc]# php -m | grep mysqli
mysqli
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I can't imagine a logical reason for this mistake right now. It is also the first time an error of this kind has occurred.
Normally the ID is created during the initial DB connection, even before the username or password is submitted. If this connection fails, the DB server might not be available or not respond at all. However, in this case the installation should have failed also.
CentOS uses application security (SELinux) - this has caused strange and difficult to explain side effects in the past. Does any log file output anything more (Apache Log, Auditd Log etc.)?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tracked the problem down - the mysql password I had specified had special characters in it. Encompassing the password in ' ' in the /opt/nagiosql/config/settings.php has resolved the problem
Thanks for looking into this
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I have a vanilla install of the latest NagiosQL version, 3.40, on my Centos 7.5 server with PHP 7.2 (remi) and MariaDB 5.5 installed. Nagios is installed alongside and working normally, the MariaDB is functioning properly
I can complete the NagiosQL installation with all green ticks, however clicking the login button on the login page does nothing. I have checked and am using the correct credentials. Each click generates the following error message in the apache logs:
PHP Warning: mysqli_close() expects parameter 1 to be mysqli, null given in /usr/local/nagios/share/webadmin/functions/MysqliDbClass.php on line 409, referer: https://nagios/nagios/webadmin/index.php
Do you have an guidance on how best to troubleshoot this?
Happy to provide any additional details as required, the following PHP packages are installed
php72-runtime-1.0-1.el7.remi.x8664
php72-php-pdo-7.2.13-2.el7.remi.x8664
php72-php-pear-1.10.7-4.el7.remi.noarch
php72-php-gd-7.2.13-2.el7.remi.x8664
php72-php-mbstring-7.2.13-2.el7.remi.x8664
php-cli-7.2.13-2.el7.remi.x8664
php-process-7.2.13-2.el7.remi.x8664
php-mysqlnd-7.2.13-2.el7.remi.x8664
php72-php-json-7.2.13-2.el7.remi.x8664
php72-php-cli-7.2.13-2.el7.remi.x8664
php72-php-mysqlnd-7.2.13-2.el7.remi.x8664
php72-php-process-7.2.13-2.el7.remi.x8664
php72-php-pecl-mysql-1.0.0-0.17.20160812git230a828.el7.remi.x8664
php72-php-pecl-mcrypt-1.0.1-4.el7.remi.x8664
php72-php-fpm-7.2.13-2.el7.remi.x8664
php72-php-opcache-7.2.13-2.el7.remi.x8664
php-json-7.2.13-2.el7.remi.x8664
php-fpm-7.2.13-2.el7.remi.x8664
php-fedora-autoloader-1.0.0-1.el7.noarch
php-xml-7.2.13-2.el7.remi.x8664
php-pdo-7.2.13-2.el7.remi.x8664
php72-php-common-7.2.13-2.el7.remi.x8664
php72-php-xml-7.2.13-2.el7.remi.x8664
php72-1.0-1.el7.remi.x8664
php72-php-xmlrpc-7.2.13-2.el7.remi.x8664
php-common-7.2.13-2.el7.remi.x8664
php-7.2.13-2.el7.remi.x8664
php-pear-1.10.7-4.el7.remi.noarch
Can you check if mysqli is avalable:
php -m | grep mysqli
I'don't see it in your module list.
Hi Martin,
I belieive mysqli functionality is enabled by the php72-php-mysqlnd-7.2.13-2.el7.remi.x86_64 package. The installation completed successfully I assume using mysqli to connect?
Output of the command below
[root@nagios etc]# php -m | grep mysqli
mysqli
I can't imagine a logical reason for this mistake right now. It is also the first time an error of this kind has occurred.
Normally the ID is created during the initial DB connection, even before the username or password is submitted. If this connection fails, the DB server might not be available or not respond at all. However, in this case the installation should have failed also.
CentOS uses application security (SELinux) - this has caused strange and difficult to explain side effects in the past. Does any log file output anything more (Apache Log, Auditd Log etc.)?
Hi Martin,
I tracked the problem down - the mysql password I had specified had special characters in it. Encompassing the password in ' ' in the /opt/nagiosql/config/settings.php has resolved the problem
Thanks for looking into this