Shared mysql modules with mysqlnd
[email protected] (Ryan Schmidt)
| Newsgroups | php.install |
|---|---|
| Message-ID | <[email protected]> |
Hi. I'm the maintainer of php in MacPorts. Our php5 port has been monolithic, with all modules compiled in statically. I'm now switching this to a more modular architecture so that shared modules can be added and removed as needed. I wanted to make the mysql modules use mysqlnd by default for the obvious reasons, but I'm having trouble making them work this way as shared modules. I think they were working fine with mysqlnd when compiled into php statically. Using php 5.3.0 I see: $ php PHP Warning: Cannot load module 'mysql' because required module 'mysqlnd' is not loaded in Unknown on line 0 dyld: lazy symbol binding failed: Symbol not found: __mysqlnd_palloc_rinit Referenced from: /mp/lib/php/extensions/no-debug-non-zts-20090626/ mysqli.so Expected in: dynamic lookup dyld: Symbol not found: __mysqlnd_palloc_rinit Referenced from: /mp/lib/php/extensions/no-debug-non-zts-20090626/ mysqli.so Expected in: dynamic lookup Trace/BPT trap $ I see this on Mac OS X 10.4.11 and 10.5.7 on Intel Macs. The mysql modules have been configured with --prefix=/mp --disable-all --disable-cgi --without-pear --with-zlib-dir=/mp --enable-pdo --with-mysql=shared,mysqlnd --with-mysqli=shared,mysqlnd --with-pdo-mysql=shared,mysqlnd I found references on third-party sites to an "--enable-mysqlnd" option but php 5.3.0 does not mention this in "./configure --help", if I try to use it it says it's an unknown option, and it doesn't change the issue. I looked into how FreeBSD Ports is doing it, and it doesn't look like they're using mysqlnd at all. Am I supposed to have a "mysqlnd.so"? I couldn't find any pages about such a module on Google so I'm guessing not. If you want to reproduce my setup on your system, you can install Xcode and MacPorts and then "sudo port install php5- mysql" (optionally "sudo port install php5 +no_web" first to avoid building apache2).