From: stefan at whocares dot de Operating system: Solaris 10 (probably all) PHP version: 5.1.4 PHP Bug Type: *Compile Issues Bug description: In a threading environment, PHP's configure picks the wrong mysql library
Description: ------------ When compiling PHP as an Apache module, libmysqlclient.so will be used no matter whether it's a threading (worker) Apache or a standard (prefork) environment. Hoewever, in a threading environment, libmysqlclient_r.so would be the correct choice. Since all the threading checks in the configure script are done *after* picking the MySQL library to use, I don't see any easy way to fix this. The best thing to do would be to check for the environment first and then use "mysql_config --libs_r" instead of "mysql_config --libs". Reproduce code: --------------- Just try to make PHP use the thread-safe libraries provided by MySQL. You'll fail. The only solution I've found is to call "configure" the way I want to and afterwards run "sed -e 's/mysqlclient/mysqlclient_r/g' Makefile > Makefile.ts; cp Makefile.ts Makefile". Actual result: -------------- As it happens, the CLI will work fine whereas the libphp4.so will report a "Cannot connect to MySQL ..." as stated here: http://bugs.mysql.com/bug.php?id=8472 (And this is way old, if I may say so). -- Edit bug report at http://bugs.php.net/?id=37739&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37739&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37739&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37739&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37739&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37739&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37739&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=37739&r=needscript Try newer version: http://bugs.php.net/fix.php?id=37739&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37739&r=support Expected behavior: http://bugs.php.net/fix.php?id=37739&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37739&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37739&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37739&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37739&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37739&r=dst IIS Stability: http://bugs.php.net/fix.php?id=37739&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37739&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37739&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37739&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=37739&r=mysqlcfg
