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 2024-02-09 11:19:34

mauro.zago
Member
Registered: 2024-02-09
Posts: 2

GLPI Update from 10.0.11 to 10.0.12 - PHP Fatal error - preg_grep()

Hello everyone,

I recently installed GLPI version 10.0.11 on a new Rocky Linux 9.3 server without any problems (Apache/2.4.57 + PHP 8.2.15 with Zend OPcache)

Today I tried the update procedure for the first time in an attempt to upgrade to version 10.0.12

The procedure does not cause problems, but once completed GLPI no longer works. Apache reports server error 500.

In the PHP logs (/var/log/php-fpm/www-error.log) I find the following error:

[09-Feb-2024 08:19:57 UTC] PHP Warning:  scandir(/var/www/glpi/locales): Failed to open directory: Permission denied in /var/www/glpi/inc/autoload.function.php on line 402
[09-Feb-2024 08:19:57 UTC] PHP Warning:  scandir(): (errno 13): Permission denied in /var/www/glpi/inc/autoload.function.php on line 402
[09-Feb-2024 08:19:57 UTC] PHP Fatal error:  Uncaught TypeError: preg_grep(): Argument #2 ($array) must be of type array, bool given in /var/www/glpi/inc/autoload.function.php:403
Stack trace:
#0 /var/www/glpi/inc/autoload.function.php(403): preg_grep()
#1 /var/www/glpi/inc/based_config.php(48): include_once('...')
#2 /var/www/glpi/index.php(51): include('...')
#3 /var/www/glpi/public/index.php(82): require('...')
#4 {main}
  thrown in /var/www/glpi/inc/autoload.function.php on line 403 

For now I am forced to restore 10.0.11, because I don't know how to solve this problem.

About the access denied warning I changed the permissions of the "locales" folder and all its files, adding read and write permission to all, in addition to the "chown apache:apache -R locales" to make sure that the user running the httpd server has all permissions. But the warning still remains.

On Rocky Linux 9 as on all RHEL 9 versions SELinux is active by default.
However, checking the logs (/var/log/audit/audit.log and /var/log/messages) there are no traces of intervention by SELinux in these errors.

Is this perhaps an incompatibility with my version of PHP?


Thanks in advance to anyone who gives me suggestions or solutions.

Mauro

Last edited by mauro.zago (2024-03-27 10:49:38)

Offline

#2 2024-03-07 17:34:28

forre.novoferm
Member
Registered: 2020-09-09
Posts: 11

Re: GLPI Update from 10.0.11 to 10.0.12 - PHP Fatal error - preg_grep()

Hello,

Same issue when I tried to upgrade frome 10.0.11 to 10.0.12.

Freeze GLPI interface.

Thanks for your help

Offline

#3 2024-04-04 16:47:31

mauro.zago
Member
Registered: 2024-02-09
Posts: 2

Re: GLPI Update from 10.0.11 to 10.0.12 - PHP Fatal error - preg_grep()

The problem remains even when updating to version 10.0.14.
I'm stuck on version 10.0.11, and I can't find a way to update.

Offline

#4 2024-04-04 17:27:11

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,814
Website

Re: GLPI Update from 10.0.11 to 10.0.12 - PHP Fatal error - preg_grep()

Check the file permissions on the locales folder inside the GLPI folder. The line of the error relates to some code that tries reading the contents of that folder to ensure that the translation files are compiled (they should be already if you use the release archive).
While checking permissions, also check the permissions of the other GLPI folders.


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

Board footer

Powered by FluxBB