Bug 24447 - Lots of "Warning: PHP Startup: Unable to load dynamic library" messages when updating PHP PEAR packages from Mageia 6 to Mageia 7/cauldron
Summary: Lots of "Warning: PHP Startup: Unable to load dynamic library" messages when ...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 6
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA6-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2019-02-28 14:51 CET by PC LX
Modified: 2019-03-14 22:41 CET (History)
4 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments
output of "php -r 'phpinfo();'" (39.78 KB, text/plain)
2019-02-28 14:52 CET, PC LX
Details

Description PC LX 2019-02-28 14:51:31 CET
Description of problem:

Next is a sample of the error messages I am seeing when updating Mageia 6 to Mageia 7/cauldron:

==================================================================
2152/3141: php-pear-File_Iterator
                                 #############################################

Warning: PHP Startup: Unable to load dynamic library 'bz2' (tried: /usr/lib64/php/extensions/bz2 (/usr/lib64/php/extensions/bz2: cannot open shared object file: No such file or directory), /usr/lib64/php/extens

Warning: PHP Startup: Unable to load dynamic library 'curl' (tried: /usr/lib64/php/extensions/curl (/usr/lib64/php/extensions/curl: cannot open shared object file: No such file or directory), /usr/lib64/php/ext

Warning: PHP Startup: Unable to load dynamic library 'gd' (tried: /usr/lib64/php/extensions/gd (/usr/lib64/php/extensions/gd: cannot open shared object file: No such file or directory), /usr/lib64/php/extension

Warning: PHP Startup: Unable to load dynamic library 'iconv' (tried: /usr/lib64/php/extensions/iconv (/usr/lib64/php/extensions/iconv: cannot open shared object file: No such file or directory), /usr/lib64/php/

Warning: PHP Startup: Unable to load dynamic library 'imap' (tried: /usr/lib64/php/extensions/imap (/usr/lib64/php/extensions/imap: cannot open shared object file: No such file or directory), /usr/lib64/php/ext

Warning: PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/lib64/php/extensions/intl (/usr/lib64/php/extensions/intl: cannot open shared object file: No such file or directory), /usr/lib64/php/ext

Warning: PHP Startup: Unable to load dynamic library 'ldap' (tried: /usr/lib64/php/extensions/ldap (/usr/lib64/php/extensions/ldap: cannot open shared object file: No such file or directory), /usr/lib64/php/ext

Warning: PHP Startup: Unable to load dynamic library 'mcrypt.so' (tried: /usr/lib64/php/extensions/mcrypt.so (/usr/lib64/php/extensions/mcrypt.so: undefined symbol: _array_init), /usr/lib64/php/extensions/mcryp

Warning: PHP Startup: Unable to load dynamic library 'fileinfo' (tried: /usr/lib64/php/extensions/fileinfo (/usr/lib64/php/extensions/fileinfo: cannot open shared object file: No such file or directory), /usr/l

Warning: PHP Startup: Unable to load dynamic library 'mysqlnd' (tried: /usr/lib64/php/extensions/mysqlnd (/usr/lib64/php/extensions/mysqlnd: cannot open shared object file: No such file or directory), /usr/lib6

Warning: PHP Startup: Unable to load dynamic library 'mysqli' (tried: /usr/lib64/php/extensions/mysqli (/usr/lib64/php/extensions/mysqli: cannot open shared object file: No such file or directory), /usr/lib64/p

Warning: PHP Startup: Unable to load dynamic library 'pgsql' (tried: /usr/lib64/php/extensions/pgsql (/usr/lib64/php/extensions/pgsql: cannot open shared object file: No such file or directory), /usr/lib64/php/

Warning: PHP Startup: Unable to load dynamic library 'xmlrpc' (tried: /usr/lib64/php/extensions/xmlrpc (/usr/lib64/php/extensions/xmlrpc: cannot open shared object file: No such file or directory), /usr/lib64/p

Warning: PHP Startup: Unable to load dynamic library 'pdo' (tried: /usr/lib64/php/extensions/pdo (/usr/lib64/php/extensions/pdo: cannot open shared object file: No such file or directory), /usr/lib64/php/extens

Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/lib64/php/extensions/pdo_mysql (/usr/lib64/php/extensions/pdo_mysql: cannot open shared object file: No such file or directory), /us

Warning: PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: /usr/lib64/php/extensions/pdo_pgsql (/usr/lib64/php/extensions/pdo_pgsql: cannot open shared object file: No such file or directory), /us

Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlite' (tried: /usr/lib64/php/extensions/pdo_sqlite (/usr/lib64/php/extensions/pdo_sqlite: cannot open shared object file: No such file or directory),

Warning: PHP Startup: Unable to load dynamic library 'zip' (tried: /usr/lib64/php/extensions/zip (/usr/lib64/php/extensions/zip: cannot open shared object file: No such file or directory), /usr/lib64/php/extens

Warning: PHP Startup: Unable to load dynamic library 'phar' (tried: /usr/lib64/php/extensions/phar (/usr/lib64/php/extensions/phar: cannot open shared object file: No such file or directory), /usr/lib64/php/ext

Warning: PHP Startup: Unable to load dynamic library 'igbinary.so' (tried: /usr/lib64/php/extensions/igbinary.so (/usr/lib64/php/extensions/igbinary.so: undefined symbol: _zval_ptr_dtor), /usr/lib64/php/extensi

Warning: PHP Startup: Unable to load dynamic library 'memcached.so' (tried: /usr/lib64/php/extensions/memcached.so (/usr/lib64/php/extensions/memcached.so: undefined symbol: _zval_ptr_dtor), /usr/lib64/php/exte
install ok: channel://pear.phpunit.de/File_Iterator-1.3.4
==================================================================


I am seeing these messages many times when updating some PHP PEAR packages but not all PHP PEAR package updates show there messages.


$ grep "Warning: PHP Startup: Unable to load dynamic library" root_cauldron_update.log | wc -l
467
$ grep "Warning: PHP Startup: Unable to load dynamic library" root_cauldron_update.log | sort -u | wc -l
24


The package updates that show these messages are:

php-pear-File_Iterator
php-pear-Text_Template
php-pear-Net_Socket
php-pear-channel-horde
php-pear-PHPUnit_MockObject
php-pear-Net_SMTP
php-pear-Net_Sieve
php-pear-PHP_TokenStream
php-pear-PHP_Invoker
php-pear-PHP_Timer
php-pear-PHPUnit_Story
php-pear-Mail_Mime
php-pear-Console_Color2
php-pear-Console_Table
php-pear-XML_Serializer
php-pear-PEAR_PackageFileManager_Plugins
php-pear-Auth_SASL
php-pear-File_Find
php-pear-channel-symfony2
php-pear-Symfony2_Yaml
php-pear-DbUnit
php-pear-PHPUnit_Selenium
php-pear-PHP_CodeCoverage
php-pear-PHPUnit
php-pear-Console_CommandLine
php-pear-Crypt_GPG
php-pear-Net_LDAP2
php-pear-Net_URL2
php-pear-HTTP_Request2
php-pear-Services_W3C_CSSValidator
php-pear-PEAR_PackageFileManager
php-pear-PEAR_PackageFileManager2



PHP information:

$ php --version
PHP 7.3.2 (cli) (built: Feb 23 2019 18:23:06) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.2, Copyright (c) 1998-2018 Zend Technologies
    with Xdebug v2.7.0RC2, Copyright (c) 2002-2019, by Derick Rethans
$ php -r 'phpinfo();'
<OUTPUT IN ATTACHMENT>



How reproducible:

Always



Steps to Reproduce:
1. Start with a Mageia 6 system with the above mentioned packages.
2. Remove the Mageia 6 repositories (urpmi.removemedia -a)
3. Add the Mageia 7/cauldron repositories (urpmi.addmedia --distrib URL)
4. Update the system (urpmi --auto-update)
5. See the messages mentioned above
Comment 1 PC LX 2019-02-28 14:52:50 CET
Created attachment 10809 [details]
output of "php -r 'phpinfo();'"
Marja Van Waes 2019-02-28 19:42:54 CET

CC: (none) => marja11
Assignee: bugsquad => php

Comment 2 Marc Krämer 2019-02-28 22:41:07 CET
I'm not sure if we can do anything about this during update.

All php-packages require php to be updated to php 7.3 -  with doing this all extensions not yet updated fail to load.
So it depends on the order urpmi decides when to update the extensions and when to update the pear packages.

CC: (none) => mageia

Comment 3 PC LX 2019-03-01 12:34:19 CET
The messages are (most likely) due to the post scripts that executes the "pear" command that in turn executes php. Then I wonder if we can trust "pear" to properly do what its suppose to do with a half working php installation.

I don't know urpmi's inner working but would it be possible to configure a "soft" dependency so that the pear packages are updated after the php core and extensions packages? Or maybe instead of a post rpm script do a post ALL rpm script (if that is a thing)?


$ rpm -q --scripts php-pear-Text_Template
postinstall scriptlet (using /bin/sh):
pear install --nodeps --soft --force --register-only /usr/share/pear/packages/Text_Template.xml
postuninstall scriptlet (using /bin/sh):
if [ "$1" -eq "0" ]; then
    pear uninstall --nodeps --ignore-errors --register-only pear.phpunit.de/Text_Template
fi
Comment 4 Marc Krämer 2019-03-01 12:49:58 CET
there is no problem "trusting" php. The core is working. Only the extensions (as the name states) are not loaded. we have another option, not to load any extension, which will not show any warnings. I'll check that option, if I can pass it to pear.
Comment 5 Marc Krämer 2019-03-01 18:52:01 CET
Fixed pear package so far. I assume, I have to update all pear packages in order the new pear is installed before the requested pear-package is installed.
Comment 6 Marc Krämer 2019-03-02 11:57:52 CET
Suggested advisory:
========================
Fixed issues in update process for pear and pecl scripts if some extensions are missing or xml-extension is disabled.


Updated packages in core/updates_testing:
========================
php-pear-1.10.1-4.mga6

Source RPMs:
php-pear-1.10.1-4.mga6.src.rpm

Whiteboard: (none) => mga6too
Assignee: php => qa-bugs

Marc Krämer 2019-03-02 11:58:09 CET

Whiteboard: mga6too => (none)
Version: Cauldron => 6

Comment 7 PC LX 2019-03-02 15:16:47 CET
Installed and tested without issue.

After updating php-pear, I did another Mageia 6 to 7/cauldron upgrade and this time there were no warning messages.

$ grep "Warning: PHP Startup: Unable to load dynamic library" root_cauldron_update.log | wc -l
0

Whiteboard: (none) => MGA6-64-OK

Comment 8 Dave Hodgins 2019-03-06 21:50:13 CET
Using qarepo to install just the update in Mageia 6 for a regression test using
phpmyadmin ...
installing php-pear-1.10.1-4.mga6.noarch.rpm from //home/dave/qa-testing/x86_64                                                                                    
Preparing...                     ################################################################################################################################  
      1/1: php-pear              ################################################################################################################################  
      1/1: removing php-pear-1:1.10.1-3.mga6.noarch                                                                                                                
                                 ################################################################################################################################  
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/xml' - /usr/lib64/php/extensions/xml: cannot open shared object file: No such file or directory in Unknown on line 0

The package php-xml is installed. /usr/lib64/php/extensions/xml.so exists.

CC: (none) => davidwhodgins
Keywords: (none) => feedback
Whiteboard: MGA6-64-OK => MGA6-64-OK

Comment 9 Marc Krämer 2019-03-06 23:11:42 CET
can you please post the version of php-xml and php-cli you have installed, I assume they have different versions.
Comment 10 Dave Hodgins 2019-03-07 21:53:29 CET
# rpm -qa|grep -e php-pear -e php-cli
php-pear-File_Iterator-1.3.4-5.mga6
php-cli-5.6.40-1.mga6
php-pear-1.10.1-4.mga6

http://localhost/phpmyadmin/index.php still works, so it's passing my regression
test.

Just ignore the warning message during the update installation?
Comment 11 Marc Krämer 2019-03-07 23:10:49 CET
what is the output of
rpm -qa|grep php-xml
?
Comment 12 Dave Hodgins 2019-03-08 00:02:16 CET
$ rpm -qa|grep php-xml
php-xml-5.6.40-1.mga6
php-xmlwriter-5.6.40-1.mga6
php-xmlreader-5.6.40-1.mga6
Comment 13 Marc Krämer 2019-03-08 10:08:00 CET
I think the problem is, php 5.6 requires the extension ".so", which php 7 does not.
I'll push a new update for this - but I have to wait until this package is removed from the server, since the package should be named "php-pear-1.10.1-3.1" and I already pushed release 4.
Comment 14 Marc Krämer 2019-03-08 10:55:31 CET
ok, new version php-pear-1.10.1-3.1 just submitted.
Comment 15 Dave Hodgins 2019-03-14 21:54:30 CET
Confirmed the update installs cleanly now, and phpmyadmin still works with it.

Advisory committed to svn. Validating the update.

Keywords: feedback => advisory, validated_update
CC: (none) => sysadmin-bugs

Comment 16 Mageia Robot 2019-03-14 22:41:05 CET
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2019-0020.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.