|  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
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
 [2012-08-21 16:44 UTC] lester at lsces dot co dot uk
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 (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:
---------------- and in the modules directory., which can be moved into the running PHP installation.

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-08-21 17:08 UTC]
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 apache module is built at the same time as the 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]
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2021-07-06 14:45 UTC]
--with-apxs2 only affects the actual SAPI build, but not
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Jul 26 23:01:23 2021 UTC