./configure --prefix=/www/httpd --with-mpm=worker --enable-so --enable-rewrite --enable-cache --enable-mem-cache --enable-disk-cache --enable-static-htcacheclean --enable-speling
./configure --prefix=/www/php --with-apxs2=/www/httpd/bin/apxs --with-gd=/usr/local/gd --enable-gd-native-ttf --with-jpeg-dir=/usr/local/jpeg --with-png-dir=/usr --with-ttf --with-zlib --with-freetype-dir=/usr/local/freetype --with-mysql=/www/mysql4118 --with-iconv --enable-mbstring --enable-ftp --with-curl --enable-maintainer-zts
php-5.2.8
checking for MySQL UNIX socket location... no
configure: error: Cannot find libmysqlclient_r under /www/servers/mysql4118.
Note that the MySQL client library is not bundled anymore!
要求mysql也要加上 --enable-thread-safe-client.
解决方法一:重新编译安装MYSQL的时候加上 --enable-thread-safe-client.
原因:--enable-thread-safe-client #Compile the client with threads. 如果没有这个参数,编译php的时候会报"Cannot find libmysqlclient_r under”之类的错误。
其实这跟PHP没有关系
那是因为我在编译APACHE的时候,使用--with-mpm模块,所以就必须在编译MYSQL的时候加上 --enable-thread-safe-client.
这是PHP5.2的一个改进,在PHP5.2.0之前的版本都不需要MYSQL启用安全线程
解决方法二:编译之前,先处理一下mysql的库,默认查找libmysqlclient_r.so,可是mysql默认为libmysqlclient.so,内容完全一样,做个链接即可
# cd /data/mysql/lib/mysql/
# ln -s libmysqlclient.so.15.0.0 libmysqlclient_r.so
照做。
再次重新编译安装PHP
顺利通过!
php-5.2.8
[Fri Dec 19 15:55:51 2008] [crit] Apache is running a threaded MPM, but your PHP Module is not compiled to be thre
adsafe. You need to recompile PHP.
Pre-configuration failed
编译apache启用了worker的mpm,编译PHP时就提示上面的.网上资料说,要在编译PHP也要加上相应的参数 --enable-maintainer-zts,但问题仍就,最后把apache的worker给取消就正常了.暂时试用段时间看