php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62880 Problems building a shared mysqlnd extension
Submitted: 2012-08-21 16:44 UTC Modified: 2021-07-06 14:45 UTC
Votes:2
Avg. Score:3.5 ± 0.5
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: lester at lsces dot co dot uk Assigned: cmb (profile)
Status: Not a bug Package: MySQLi related
PHP Version: 5.4.6 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lester at lsces dot co dot uk
New email:
PHP Version: OS:

 

 [2012-08-21 16:44 UTC] lester at lsces dot co dot uk
Description:
------------
This may be by design, but it is also being claimed that it does in fact work, so the main object of this bug report is to get a documented confirmation of the situation.
Fixed bug http://bugs.php.net/55609 (mysqlnd cannot be built shared). (Johannes)  identifies the problem as having been fixed, but Rasmus claims that it is not intended that mysqlnd should be built stand alone?
In any case when building as an apache2 module, a shared module is created, but will not load with apache.  

Test script:
---------------
./configure --with-apxs2=/opt/apache2/bin/apxs --prefix=/opt/php5 --with-config-file-path=/opt/apache2/conf --with-config-file-scan-dir=/opt/apache2/conf/php5.d --enable-mysqlnd=shared --with-mysqli=shared 

I'm sure that should be a "--with-mysqli=mysqlnd,shared" but that stops building of ./configure with a "can't find mysql" (Bug 50393)

Expected result:
----------------
mysqlnd.so and mysqli.so in the modules directory., which can be moved into the running PHP installation.

Actual result:
--------------
When loading mysqlnd.so via apache, it fails with an PHP Warning:  PHP Startup: Invalid library (maybe not a PHP library) 'mysqlnd.so' in Unknown on line 0 on the latest build, but I've also had
"Unable to load dynamic library '/opt/php5/ext/mysqlnd.so' - /opt/php5/ext/mysqlnd.so: undefined symbol: executor_globals in Unknown on line 0"  So I am going to recheck everything on the next machine that needs updating

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-08-21 17:08 UTC] nikic@php.net
The error suggests that you are trying to build mysqlnd without zts and try to load it in a php build with zts. Try adding --enable-maintainer-zts to your ./configure line.
 [2012-08-21 17:45 UTC] lester at lsces dot co dot uk
BUT the libphp5.so apache module is built at the same time as the mysqlnd.so module so why would they be different? Which had been an earlier suggestion to solve the problem.
Interestingly ... it worked ... so perhaps the question now is why is it needed? Why are the two files incompatible without "--enable-maintainer-zts"
 [2021-07-06 14:45 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2021-07-06 14:45 UTC] cmb@php.net
--with-apxs2 only affects the actual SAPI build, but not
extensions.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC