Question

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

  • 22 November 2022
  • 9 replies
  • 611 views

Userlevel 3
Badge +6

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.


9 replies

Userlevel 6
Badge +18

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

Userlevel 3
Badge +6

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 6
Badge +18

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 3
Badge +6

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 4
Badge +12

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 3
Badge +6

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 4
Badge +12

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 +5

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.

Badge +3

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



Same problem here and this “tip” make our day.
We put days ago a public wildcard certificate and and we didn't think that could be the problem.
we decided to try and we put ". $ex->getMessage()"  at the end of line 232.
Here we go: ssl error! damn!
After we put the sectigo's CA in /etc/pki/ca-trust/source/anchors/ the problem ha disappeared.
Thank you!!!

Reply