You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2023-01-12 18:30:46

Thomas Williamson
Member
Registered: 2019-04-08
Posts: 21

Automatic actions not running automatically following upgrade to PHP 8

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

#2 2023-01-13 10:12:30

Kaya84
Member
Registered: 2019-06-13
Posts: 217

Re: Automatic actions not running automatically following upgrade to PHP 8

Which version of GLPI are you using?

Offline

#3 2023-01-13 12:16:58

Thomas Williamson
Member
Registered: 2019-04-08
Posts: 21

Re: Automatic actions not running automatically following upgrade to PHP 8

Sorry, essential information... I'm using GLPI 10.0.3.

Offline

#4 2023-01-16 09:43:37

Kaya84
Member
Registered: 2019-06-13
Posts: 217

Re: Automatic actions not running automatically following upgrade to PHP 8

Offline

#5 2023-01-16 12:47:11

Thomas Williamson
Member
Registered: 2019-04-08
Posts: 21

Re: Automatic actions not running automatically following upgrade to PHP 8

Thanks @Kaya84! Unfortunately not...

Offline

#6 2023-01-16 16:10:34

Kaya84
Member
Registered: 2019-06-13
Posts: 217

Re: Automatic actions not running automatically following upgrade to PHP 8

copy and paste (except password) the /var/www/glpi/config/config_db.php file

Offline

#7 2023-01-16 16:45:38

Thomas Williamson
Member
Registered: 2019-04-08
Posts: 21

Re: Automatic actions not running automatically following upgrade to PHP 8

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

#8 2023-01-16 17:05:57

Kaya84
Member
Registered: 2019-06-13
Posts: 217

Re: Automatic actions not running automatically following upgrade to PHP 8

try with '127.0.0.1' on $dbhost

Offline

#9 2023-01-18 18:03:13

Thomas Williamson
Member
Registered: 2019-04-08
Posts: 21

Re: Automatic actions not running automatically following upgrade to PHP 8

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

#10 2023-01-20 11:01:26

Kaya84
Member
Registered: 2019-06-13
Posts: 217

Re: Automatic actions not running automatically following upgrade to PHP 8

I read, but try again.
And be sure to put 127.0.0.1 inside single quote

Offline

#11 2023-01-23 13:49:48

Thomas Williamson
Member
Registered: 2019-04-08
Posts: 21

Re: Automatic actions not running automatically following upgrade to PHP 8

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

Board footer

Powered by FluxBB