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 2025-03-06 13:29:45

WebGreg
Member
Registered: 2020-02-27
Posts: 772

[10.0.18] Missing required intl PHP extension in Session.php

Hi.

The following entry appears in the php-error.log file:

(2025-03-06 12:21:01) glpiphplog.WARNING:   *** PHP User Warning (512): Missing required intl PHP extension in /var/www/html/glpi/src/Session.php at line 800

  Backtrace :
  src/Session.php:800                                trigger_error()
  inc/includes.php:69                                Session::loadLanguage()
  front/cron.php:44                                  include()

I found this thread: https://github.com/glpi-project/glpi/issues/12263 but I don't think this is my case.

php -m | grep intl
intl

Last edited by WebGreg (2025-03-06 13:31:06)


--
GLPI 10.0.18
GLPI-Inventory 1.5.0
Ubuntu Server 20.04 LTS

Offline

#2 2025-03-06 23:26:46

cconard96
Moderator
Registered: 2018-07-31
Posts: 3,265
Website

Re: [10.0.18] Missing required intl PHP extension in Session.php

Check your crontab to make sure you don't have it using a specific PHP version. Also check that the system default version and the version used by the web server are the same. At least the system default version of PHP has the required extension, but there is likely another version being used somewhere that is missing it.


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#3 2025-03-07 01:02:37

WebGreg
Member
Registered: 2020-02-27
Posts: 772

Re: [10.0.18] Missing required intl PHP extension in Session.php

Hi @cconard96  Thank You

sudo nano /etc/crontab

Here I had:

* * * * * root /usr/bin/php7.4 /var/www/html/glpi/front/cron.php &>/dev/null

I fixed it to:

* * * * * root /usr/bin/php8.4 /var/www/html/glpi/front/cron.php &>/dev/null


Now the log shows:

[2025-03-06 22:59:01] glpiphplog.CRITICAL:   *** Uncaught Exception Error: Call to undefined function mysqli_report() in /var/www/html/glpi/src/DBmysql.php at line 226
  Backtrace :
  src/DBmysql.php:209                                DBmysql->connect()
  src/DBConnection.php:416                           DBmysql->__construct()
  src/DBConnection.php:510                           DBConnection::switchToMaster()
  inc/config.php:129                                 DBConnection::establishDBConnection()
  inc/includes.php:58                                include_once()
  front/cron.php:44                                  include()



I managed to find a solution:

sudo apt-get install php8.4-mysqli
sudo systemctl restart apache2

Last edited by WebGreg (2025-03-07 01:11:38)


--
GLPI 10.0.18
GLPI-Inventory 1.5.0
Ubuntu Server 20.04 LTS

Offline

#4 2025-03-07 01:17:26

cconard96
Moderator
Registered: 2018-07-31
Posts: 3,265
Website

Re: [10.0.18] Missing required intl PHP extension in Session.php

You shouldn't be running anything related to GLPI as root as it usually causes file permission issues. You should change it to be the user your web server runs under (www-data for example).

Which PHP version's module is enabled in Apache? Again, I suspect you have different versions.
ls /etc/apache2/mods-enabled/


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#5 2025-03-07 08:53:22

WebGreg
Member
Registered: 2020-02-27
Posts: 772

Re: [10.0.18] Missing required intl PHP extension in Session.php

OK I changed user.

access_compat.load  authn_core.load  authz_user.load  deflate.load  filter.load       mpm_prefork.load  php8.3.conf      rewrite.load        ssl.conf
alias.conf          authn_file.load  autoindex.conf   dir.conf      mime.conf         negotiation.conf  php8.3.load      setenvif.conf       ssl.load
alias.load          authz_core.load  autoindex.load   dir.load      mime.load         negotiation.load  reqtimeout.conf  setenvif.load       status.conf
auth_basic.load     authz_host.load  deflate.conf     env.load      mpm_prefork.conf  perl.load         reqtimeout.load  socache_shmcb.load  status.load

But

$  php -v
PHP 8.4.4 (cli) (built: Feb 15 2025 08:58:40) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.4.4, Copyright (c) Zend Technologies
    with Zend OPcache v8.4.4, Copyright (c), by Zend Technologies

Last edited by WebGreg (2025-03-07 08:57:08)


--
GLPI 10.0.18
GLPI-Inventory 1.5.0
Ubuntu Server 20.04 LTS

Offline

#6 2025-03-07 11:47:15

cconard96
Moderator
Registered: 2018-07-31
Posts: 3,265
Website

Re: [10.0.18] Missing required intl PHP extension in Session.php

PHP 8.4 is technically compatible with GLPI 10.0.18 but isn't explicitly supported until the next bug fix release (10.0.19). You should be OK to use it though.

If you want to use PHP 8.4:
- Install all required extensions for GLPI for the PHP 8.4 version
- Run "sudo a2dismod php8.3"
- Run "sudo a2enmod php8.4"
- Restart Apache "sudo systemctl restart apache2"

If you want to use PHP 8.3:
- Run "sudo update-alternatives --config php"


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#7 2025-03-07 12:36:00

WebGreg
Member
Registered: 2020-02-27
Posts: 772

Re: [10.0.18] Missing required intl PHP extension in Session.php

cconard96 wrote:

PHP 8.4 is technically compatible with GLPI 10.0.18 but isn't explicitly supported until the next bug fix release (10.0.19). You should be OK to use it though.

I know, I found it https://github.com/glpi-project/glpi/pull/19053 when I was looking for something regarding the global lock. But I missed it, sorry for the double sad

cconard96 wrote:

If you want to use PHP 8.4:
(...)
If you want to use PHP 8.3:

Thank you.


--
GLPI 10.0.18
GLPI-Inventory 1.5.0
Ubuntu Server 20.04 LTS

Offline

Board footer

Powered by FluxBB