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 2021-04-30 09:19:38

planque
Member
Registered: 2021-04-23
Posts: 3

Migration 9.2.2 vers 9.5.5. Erreur PhpSerialize.php

Bonjour,

Après la migration de notre version 9.2.2 vers 9.5.5, le script cron.php ne fonctionne pas. J'ai l'erreur suivante
----------
[2021-04-29 15:27:57] glpiphplog.CRITICAL:   *** Uncaught Exception Laminas\Serializer\Exception\RuntimeException: Serialized data must be a string containing serialized PHP code; received:  in  glpi/vendor/laminas/laminas-serializer/src/Adapter/PhpSerialize.php at line 112
  Backtrace :
  ...inas-cache/src/Storage/Plugin/Serializer.php:72 Laminas\Serializer\Adapter\PhpSerialize->unserialize()
  ...s/laminas-eventmanager/src/EventManager.php:321 Laminas\Cache\Storage\Plugin\Serializer->onReadItemPost()
  ...s/laminas-eventmanager/src/EventManager.php:170 Laminas\EventManager\EventManager->triggerListeners()
  ...che/src/Storage/Adapter/AbstractAdapter.php:220 Laminas\EventManager\EventManager->triggerEvent()
  ...che/src/Storage/Adapter/AbstractAdapter.php:369 Laminas\Cache\Storage\Adapter\AbstractAdapter->triggerPost()
  ...as-cache/src/Storage/Adapter/Filesystem.php:553 Laminas\Cache\Storage\Adapter\AbstractAdapter->getItem()
  .../laminas-i18n/src/Translator/Translator.php:607 Laminas\Cache\Storage\Adapter\Filesystem->getItem()
  .../laminas-i18n/src/Translator/Translator.php:440 Laminas\I18n\Translator\Translator->loadMessages()
  .../laminas-i18n/src/Translator/Translator.php:355 Laminas\I18n\Translator\Translator->getTranslatedMessage()
  inc/autoload.function.php:124                      Laminas\I18n\Translator\Translator->translate()
  plugins/fields/setup.php:187                       __()
  inc/plugin.class.php:1471                          plugin_version_fields()
  inc/plugin.class.php:1511                          Plugin::getInfo()
  inc/plugin.class.php:438                           Plugin->getInformationsFromDirectory()
  inc/plugin.class.php:421                           Plugin->checkPluginState()
  inc/plugin.class.php:208                           Plugin->checkStates()
  inc/includes.php:106                               Plugin->init()
  front/cron.php:38                                  include()
---------

Compte-rendu de l'onglet Systeme dans GLPI

Résultat de l'installation  :
------------------------------------------

GLPI 9.5.5 (/glpi => xxx/glpi)
Installation mode: TARBALL

Server

Operating system: Linux xxxxx  4.18.0-193.19.1.el8_2.x86_64 #1 SMP Mon Sep 14 14:37:00 UTC 2020 x86_64
PHP 7.3.27 fpm-fcgi (Core, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apcu, bcmath, bz2, calendar, cgi-fcgi, crypto,
    ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, igbinary, imagick, imap, intl, json, ldap,
    libxml, mbstring, mcrypt, memcache, mysqli, mysqlnd, openssl, pcre, pdo_mysql, pdo_sqlite, posix, redis, session, shmop,
    sockets, sodium, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip,
    zlib)
Setup: max_execution_time="30" memory_limit="2G" post_max_size="2G" safe_mode="" session.save_handler="files"
    upload_max_filesize="2G"
Software: Apache ()
    Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Server Software: MariaDB Server
    Server Version: 10.3.27-MariaDB-log
    Server SQL Mode:
    Parameters: glpi@xxxxx/glpi
    Host info: xxxxx via TCP/IP
   
PHP version is at least 7.2.0 - Perfect!PHP version is at least 7.2.0 - Perfect!
Sessions support is available - Perfect!Sessions support is available - Perfect!
Allocated memory > 64 Mio - Perfect!Allocated memory > 64 Mio - Perfect!
mysqli extension is installedmysqli extension is installed
ctype extension is installedctype extension is installed
fileinfo extension is installedfileinfo extension is installed
json extension is installedjson extension is installed
mbstring extension is installedmbstring extension is installed
iconv extension is installediconv extension is installed
zlib extension is installedzlib extension is installed
curl extension is installedcurl extension is installed
gd extension is installedgd extension is installed
simplexml extension is installedsimplexml extension is installed
intl extension is installedintl extension is installed
ldap extension is installedldap extension is installed
apcu extension is installedapcu extension is installed
Zend OPcache extension is installedZend OPcache extension is installed
xmlrpc extension is installedxmlrpc extension is installed
CAS extension is not presentCAS extension is not present
exif extension is installedexif extension is installed
zip extension is installedzip extension is installed
bz2 extension is installedbz2 extension is installed
sodium extension is installedsodium extension is installed
Database version seems correct (10.3.27) - Perfect!Database version seems correct (10.3.27) - Perfect!
Access to timezone database (mysql) is not allowed.Access to timezone database (mysql) is not allowed.
The log file has been created successfully.The log file has been created successfully.
Write access to xxx/glpi/files/_cache has been validated.Write access to /usr/local/intratest/glpi/files/_cache has been validated.
Write access to xxx/glpi/config has been validated.Write access to /usr/local/intratest/glpi/config has been validated.
Write access to xxx/glpi/files/_cron has been validated.Write access to /usr/local/intratest/glpi/files/_cron has been validated.
Write access to xxx/glpi/files has been validated.Write access to /usr/local/intratest/glpi/files has been validated.
Write access to xxx/glpi/files/_dumps has been validated.Write access to /usr/local/intratest/glpi/files/_dumps has been validated.
Write access to xxx/glpi/files/_graphs has been validated.Write access to /usr/local/intratest/glpi/files/_graphs has been validated.
Write access to xxx/glpi/files/_lock has been validated.Write access to /usr/local/intratest/glpi/files/_lock has been validated.
Write access to xxx/glpi/files/_pictures has been validated.Write access to /usr/local/intratest/glpi/files/_pictures has been validated.
Write access to xxx/glpi/files/_plugins has been validated.Write access to /usr/local/intratest/glpi/files/_plugins has been validated.
Write access to xxx/glpi/files/_rss has been validated.Write access to /usr/local/intratest/glpi/files/_rss has been validated.
Write access to xxx/glpi/files/_sessions has been validated.Write access to /usr/local/intratest/glpi/files/_sessions has been validated.
Write access to xxx/glpi/files/_tmp has been validated.Write access to /usr/local/intratest/glpi/files/_tmp has been validated.
Write access to xxx/glpi/files/_uploads has been validated.Write access to /usr/local/intratest/glpi/files/_uploads has been validated.
Write access to xxx/glpi/marketplace has been validated.Write access to /usr/local/intratest/glpi/marketplace has been validated.
Web access to the files directory should not be allowed but this cannot be checked automatically on this instance. Make sure access to error log file (/glpi/files/_log/php-errors.log) is forbidden; otherwise review .htaccess file and web server configuration.Web access to the files directory should not be allowed but this cannot be checked automatically on this instance.
Make sure access to error log file (/glpi/files/_log/php-errors.log) is forbidden; otherwise review .htaccess file and web server configuration.
For security reasons, SELinux mode should be Enforcing.For security reasons, SELinux mode should be Enforcing.


Merci de votre aide
Annie Planque

Offline

#2 2021-11-16 13:09:32

virgiliu
Member
Registered: 2021-11-16
Posts: 1

Re: Migration 9.2.2 vers 9.5.5. Erreur PhpSerialize.php

Hello,

I have the same problem, it seems to be that:
plugins/fields/setup.php:187                       __()
and at line 187 we have :
'name'           => __("Additionnal fields", "fields"),
If you change the line with:
'name'           => 'Additionnal fields',
the problem disappears
All the plugins in GLPI that have in setup.php file:
'name'           =>    " __( "      'xyzPluginName', 'xyz' )
it give this error in file php-errors.log

Seems to be that string ("  __(  ") could not be unserialize() ???
I hope this issue will be resolved soon.

Offline

Board footer

Powered by FluxBB