Question

upgrade 22.04 to 22.10 : many php mwarning with php-pecl-gnupg

  • 22 November 2022
  • 8 replies
  • 79 views

Userlevel 1
Badge +4

Hi,

I’ve updated my test server from 22.04.7 to 22.10.1

During php-pecl-gnupg update, I have several warning like this:

 

Running transaction
Updating : php-common-8.1.12-1.el7.remi.x86_64 1/30
Updating : php-xml-8.1.12-1.el7.remi.x86_64 2/30
Updating : php-pdo-8.1.12-1.el7.remi.x86_64 3/30
Updating : php-mysqlnd-8.1.12-1.el7.remi.x86_64 4/30
Updating : php-pecl-xmlrpc-1.0.0~rc3-1.el7.remi.8.1.x86_64 5/30
Updating : php-pecl-gnupg-1.5.1-1.el7.remi.8.1.x86_64 6/30
PHP Warning: PHP Startup: bz2: Unable to initialize module
Module compiled with module API=20210902
PHP compiled with module API=20200930
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: calendar: Unable to initialize module
Module compiled with module API=20210902
PHP compiled with module API=20200930
These options need to match
in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'mysqlnd' (tried: /usr/lib64/php/modules/mysqlnd (/usr/lib64/php/modules/mysqlnd: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/mysqlnd.so (/usr/lib64/php/modules/mysqlnd.so: undefined symbol: zend_gcvt)) in Unknown on line 0
PHP Warning: PHP Startup: PDO: Unable to initialize module
Module compiled with module API=20210902
PHP compiled with module API=20200930
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'phar' (tried: /usr/lib64/php/modules/phar (/usr/lib64/php/modules/phar: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/phar.so (/usr/lib64/php/modules/phar.so: undefined symbol: php_crc32_stream_bulk_update)) in Unknown on line 0
PHP Warning: PHP Startup: SimpleXML: Unable to initialize module
Module compiled with module API=20210902
PHP compiled with module API=20200930
PHP Warning:  foreach() argument must be of type array|object, null given in /usr/share/pear/PEAR/Command.php on line 249
PHP Warning: foreach() argument must be of type array|object, null given in /usr/share/pear/PEAR/Command.php on line 249
PHP Warning: foreach() argument must be of type array|object, null given in /usr/share/pear/PEAR/Command.php on line 249
PHP Warning: foreach() argument must be of type array|object, null given in /usr/share/pear/PEAR/Command.php on line 249
PHP Warning: foreach() argument must be of type array|object, null given in /usr/share/pear/PEAR/Command.php on line 249
PHP Warning: foreach() argument must be of type array|object, null given in /usr/share/pear/PEAR/Command.php on line 249
PHP Warning: foreach() argument must be of type array|object, null given in /usr/share/pear/PEAR/Command.php on line 249
PHP Warning: foreach() argument must be of type array|object, null given in /usr/share/pear/PEAR/Command.php on line 249
PHP Warning: foreach() argument must be of type array|object, null given in /usr/share/pear/PEAR/Command.php on line 249
PHP Warning: foreach() argument must be of type array|object, null given in /usr/share/pear/PEAR/Command.php on line 249
PHP Warning: foreach() argument must be of type array|object, null given in /usr/share/pear/PEAR/Command.php on line 249
PHP Warning: Trying to access array offset on value of type null in /usr/share/pear/PEAR/Installer/Role.php on line 250
PHP Warning: Trying to access array offset on value of type null in /usr/share/pear/PEAR/Installer/Role.php on line 251
PHP Warning: Trying to access array offset on value of type null in /usr/share/pear/PEAR/Installer/Role.php on line 250

No problem with other php package update, only php-pecl-gnupg . It’s the first time I have those warning during an upgrade.

My test server was updated before upgrade, and the package was: php-pecl-gnupg-1.5.1-1.el7.remi.8.0.x86_64

Anyway, the server seems OK, checks are OK, web UI too. The only bug I have noticed until now is with the new config export fonctionnality. When trying to use it, I have the error:

But if I export as before, everything is fine.

Any ideas ?

Thanks.


8 replies

Userlevel 5
Badge +13

HI @MichaelW did you restart php-fpm and httpd after update?

Userlevel 1
Badge +4

Hi @Laurent ,

 

Sorry for the delay, I wasn’t at the office the last days.

Yes, I have restarted the central before the upgrade, and php-fpm/httpd after the upgrade.

I’ve had no warnings when upgrade from php 7 to 8, only with upgrade from php 8.0 to 8.1.

 

 

 

Userlevel 5
Badge +13

Hi @MichaelW another customer used to have certificate error.

Can you edit the /usr/share/centreon/src/Centreon/Application/Controller/Configuration/MonitoringServerController.php file and change lines 230-233 to have:

            throw new MonitoringServerException(
'There was an consistency error in the exported files - please use the legacy export menu to '
. 'troubleshoot: ' . $ex->getMessage()
);

Then check again log file

Userlevel 1
Badge +4

Hi @Laurent 

As you said, I have a certificate error.

There was an consistency error in the exported files  - please use the legacy export menu to troubleshootErreur de génération sur le serveur de supervision #1 : Peer's Certificate issuer is not recognized. for \"https://xxxxxxxxx/centreon/include/configuration/configGenerate/xml/generateFiles.php\". at /usr/share/centreon/src/Centreon/Application/Controller/Configuration/MonitoringServerController.php:230)"}

 

Userlevel 3
Badge +11

Hi @MichaelW

Depending on how your certificate is signed, please try one of the following:

  • a self-signed certificate: copy the local certificate to /etc/pki/ca-trust/source/anchors/ and then run update-ca-trust
  • a certificate signed by an internal authority copy the CA’s root certificate to /etc/pki/ca-trust/source/anchors/ and then run update-ca-trust

Then try exporting again.

Userlevel 1
Badge +4

I have done this, but same error. Export is ok with normal method, KO with new method.

It’s not really a problem, I can export as before, but I would like to know if it’s a bug or a problem with my test server :) 

Userlevel 3
Badge +11

This message is pretty clear, though:

Peer's Certificate issuer is not recognized. for \"https://xxxxxxxxx/centreon/include/configuration/configGenerate/xml/generateFiles.php\"

If you have succesfully added the issuer/certificate to the trusted list, I bet the error message has changed to something like “the hostname does not match the CN from the certificate”.

Can you check your logs again?

Badge +1

I came across this same issue and adding the internal CA certificate as instructed above instantly fixed the issue, thanks.

I also hope you consider keeping the error display for a future release - I detest developers treating enterprise IT like consumer IT and hiding critical information. We need to see everything so stop hiding information that would obviously help us diagnose things quicker - I want to see exactly what something is doing, not have to hunt through hundreds of error logs.

Reply