Bug 23385 - mysq support broken, because of wrong loading order with another extension
Summary: mysq support broken, because of wrong loading order with another extension
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: PHP Stack Maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-02 22:21 CEST by Guillaume Rousse
Modified: 2018-08-03 20:16 CEST (History)
2 users (show)

See Also:
Source RPM: php
CVE:
Status comment:


Attachments

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


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