Bug 23385

Summary: mysq support broken, because of wrong loading order with another extension
Product: Mageia Reporter: Guillaume Rousse <guillomovitch>
Component: RPM PackagesAssignee: PHP Stack Maintainers <php>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: Normal CC: mageia, marja11
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: php CVE:
Status comment:

Description Guillaume Rousse 2018-08-02 22:21:24 CEST
php mysqlnd extension requires hash extension to be loaded at initialization time, otherwise it fails to load. Unfortunatly, given defaut configuration files naming (33_mysqlnd.ini, 54_hash.ini), hash extension is loaded after mysqlnd: 

[guillaume@beria ~]$ php -r ''
PHP 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/lib64/php/extensions/mysqlnd.so (/usr/lib64/php/extensions/mysqlnd.so: undefined symbol: PHP_SHA256Init)) in Unknown on line 0
PHP 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), /usr/lib64/php/extensions/pdo_mysql.so (/usr/lib64/php/extensions/pdo_mysql.so: undefined symbol: mysqlnd_allocator)) in Unknown on line 0

The most simple solution is just to rename the configuration files. Or, as fedora does, to build hash extension statically in php core, to completly avoid this kind of issues (and make the whole php stack a bit simpler).
Comment 1 Marja Van Waes 2018-08-03 16:33:16 CEST
Assigning to the php stack maintainers, CC'ing the registered maintainer.

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

Comment 2 Marc Krämer 2018-08-03 20:16:38 CEST
I wonder why this hit you. We have the same order in php 5.6 and I did some tests using mysqli extension (which uses mysqlnd as backend).

I don't see a problem in moving this extension. I've put a new version to cauldron with

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