You are not logged in.
Hello,
This is my GLPI server environment:
- OpenSuse Leap 15.4
- PHP 7.4.33
- MariaDB 10.7.7
- Apache/2.4.51 (Linux/SUSE)
Following the upgrade of PHP from v7.4.33 to v8.0.27, I get a cron email notification every 5 minutes, with the following message:
PHP Warning: mysqli::real_connect(): (HY000/2002): No such file or directory in /var/www/glpi/src/DBmysql.php on line 250
A link to the SQL server could not be established. Please check your configuration.
Le serveur Mysql est inaccessible. Vérifiez votre configuration.
Here is crontab:
srv-glpi:~ # crontab -l
*/5 * * * * /usr/bin/php /var/www/glpi/front/cron.php
In GLPI UI, the automatic tasks work fine when launched manually (mailgate and queuednotification), but do not execute automatically. The next execution time is displaying 'As soon as possible'.
I have adjusted the date.timezone PHP parameter in /etc/php8/apache2/php.ini file.
I have tried to replace localhost with 127.0.0.1 within /var/www/glpi/config/config_db.php file.
Without success...
I don't understand this mysql error as the application is necessarily connected to the DB, as I can connect and navigate through it.
Thanks for help!
Thomas
Offline
Which version of GLPI are you using?
Offline
Sorry, essential information... I'm using GLPI 10.0.3.
Offline
Uhm... check if this helps:
https://forum.glpi-project.org/viewtopic.php?id=280410
Offline
Thanks @Kaya84! Unfortunately not...
Offline
copy and paste (except password) the /var/www/glpi/config/config_db.php file
Offline
srv-glpi:~ # cat /var/www/glpi/config/config_db.php
<?php
class DB extends DBmysql {
public $dbhost = 'localhost';
public $dbuser = 'glpi';
public $dbpassword = 'xxxxxxxx';
public $dbdefault = 'glpi';
public $allow_datetime = false;
public $allow_myisam = false;
public $use_utf8mb4 = true;
public $allow_signed_keys = false;
}
Offline
try with '127.0.0.1' on $dbhost
Offline
Already tested as written in my initial post. Sorry...
I have tried to replace localhost with 127.0.0.1 within /var/www/glpi/config/config_db.php file.
Offline
I read, but try again.
And be sure to put 127.0.0.1 inside single quote
Offline
I tried again and I guess the problem is solved! Thank you again...
Please note that the message As soon as possible next to the Next execution time part of the mailgate automatic action first showed up again. I then had to click the Execute button to launch the action manually. The message was still there. It eventually went away after next 5 minutes step has arrived. The action has launched without problem since then, without anymore a As soon as possible mention...
Offline