go to bug id or search bugs for
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.
./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)
mysqlnd.so and mysqli.so in the modules directory., which can be moved into the running PHP installation.
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
Add a Patch
Add a Pull Request
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.
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"