php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39369 PHP 5.2.0 will not compiled with MySQL support
Submitted: 2006-11-04 04:57 UTC Modified: 2006-11-04 10:26 UTC
From: nathan at officelink dot net dot au Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.2.0 OS: FreeBSD 6.1-RELEASE-p10
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nathan at officelink dot net dot au
New email:
PHP Version: OS:

 

 [2006-11-04 04:57 UTC] nathan at officelink dot net dot au
Description:
------------
Unable to get PHP 5.2.0 to compile with MySQL support. PHP versions prior to this work perfectly with an identical ./configure line.



Reproduce code:
---------------
./configure --with-apxs2=/usr/local/apache/bin/apxs  --enable-ftp  --enable-magic-quotes  --enable-track-vars  --enable-sockets  --with-gettext  --with-gd  --with-zlib-dir=/usr/local  --with-freetype-dir=/usr/local  --enable-soap  --with-mysqli=/usr/local/mysql/bin/mysql_config  --with-xmlrpc  --with-imap=/usr/local/src/imap-2004g  --enable-mbstring=all  --with-mime-magic=/usr/share/misc/magic.mime  --with-mcrypt  --with-iconv  --enable-mbregex  --enable-mime-magic  --with-openssl=/usr/local/ssl  --with-imap-ssl  --with-mysql=/usr/local/mysql

on PHP 5.2.0 I get:

checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... no
configure: error: Cannot find libmysqlclient_r under /usr/local/mysql.
Note that the MySQL client library is not bundled anymore!

MySQL version is 

mysql  Ver 14.12 Distrib 5.0.27, for unknown-freebsd6.1 (i386) using  EditLine wrapper

compiled from source with

./configure --prefix=/usr/local/mysql --without-debug



Expected result:
----------------
on PHP 5.1.6 I get:

checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... no
checking for mysql_close in -lmysqlclient... yes
checking for MySQLi support... yes
checking whether to enable embedded MySQLi support... no
checking for mysql_set_server_option in -lmysqlclient... yes
checking for mysql_stmt_field_count in -lmysqlclient... yes


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-04 09:19 UTC] rasmus@php.net
Are you using a threaded mpm in Apache2?  It is looking for the threadsafe mysqlclient library as a result.
 [2006-11-04 09:24 UTC] nathan at officelink dot net dot au
Yes, here is my Apache configure line:

./configure --prefix=/usr/local/apache --enable-module=so --with-mpm=worker --enable-ssl --enable-deflate --enable-cern-meta --enable-expires --enable-headers --enable-vhost-alias --enable-rewrite --enable-access --enable-auth --enable-include --enable-log_config --enable-env --enable-setenvif --enable-http --enable-mime --enable-status --enable-autoindex --enable-asis --enable-cgi --enable-negotiation --enable-dir --enable-actions --enable-userdir --enable-alias -enable-mem-cache --enable-cache --enable-headers --enable-deflate
 [2006-11-04 09:38 UTC] rasmus@php.net
Ok, and do you have libmysqlclient_r installed?  You need the threadsafe version of that library or you need to use the prefork mpm with Apache.
 [2006-11-04 10:09 UTC] nathan at officelink dot net dot au
Thanks Rasmus, that has fixed my problem.

I'm confused as to why this worked under versions earlier of PHP but I now understand what was wrong. I have now compiled MySQL with --enable-thread-safe-client.

Thanks again,

Nathan
 [2006-11-04 10:26 UTC] derick@php.net
Ok, not a bug then... but make *really* sure you want the problems of a threaded apache. I suggest to pick the worker mpm.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 04:01:33 2025 UTC