php专区

 首页 > php专区 > PHP基础 > 环境 > checking for mysql_close in -lmysqlclient_r… no

checking for mysql_close in -lmysqlclient_r… no

分享到:
【字体:
导读:
          在自己编辑安装php时提示 checking for mysql_close in -lmysqlclient_r no ,看这句我看是什么mysql问题,但结果是不是它的问题呢,下面我们一起来看看. 又在折腾服务器了~记录下自己编译php5.3.24的过...

在自己编辑安装php时提示 checking for mysql_close in -lmysqlclient_r… no ,看这句我看是什么mysql问题,但结果是不是它的问题呢,下面我们一起来看看.

又在折腾服务器了~记录下自己编译php5.3.24的过程,执行了以下的 configure 配置命令,代码如下:

  1. ./configure  
  2.    --prefix=/usr/local/php  
  3.    --with-config-file-path=/usr/local/php/etc  
  4.    --with-config-file-scan-dir=/usr/local/php/etc/conf.d  
  5.    --enable-fpm  
  6.    --with-fpm-user=webserver  
  7.    --with-fpm-group=webserver  
  8.    --with-curl  
  9.    --with-pear  
  10.    --with-gd  
  11.    --with-jpeg-dir  
  12.    --with-png-dir  
  13.    --with-zlib  
  14.    --with-xpm-dir  
  15.    --with-freetype-dir  
  16.    --with-mcrypt  
  17.    --with-mhash  
  18.    --with-mysql=/usr/local/mysql  
  19.    --with-mysqli=/usr/local/mysql  
  20.    --with-pdo-mysql=/usr/local/mysql  
  21.    --with-openssl  
  22.    --with-xmlrpc  
  23.    --with-xsl  
  24.    --with-bz2  
  25.    --with-gettext  
  26.    --disable-debug  
  27.    --enable-fpm  
  28.    --enable-exif  
  29.    --enable-wddx  
  30.    --enable-zip  
  31.    --enable-bcmath  
  32.    --enable-calendar  
  33.    --enable-ftp  
  34.    --enable-mbstring  
  35.    --enable-soap  
  36.    --enable-sockets  
  37.    --enable-sqlite-utf8  
  38.    --enable-shmop  
  39.    --enable-dba //开源代码phpfensi.com 
  40.    --enable-sysvsem  
  41.    --enable-sysvshm  
  42.    --enable-sysvmsg 

遇到了如下错误:

  1. checking for mysql_close in -lmysqlclient_r... no 
  2.     checking for mysql_error in -lmysqlclient_r... no 
  3.     configure: error: mysql configure failed. Please check config.log for more information. 

查证、搜索后,找到一blog,是这样的原因:

  1. See this bug report: http://www.phpfensi.com 
  2. If you need libmysql, apply the patch or create the symlink. 
  3. Better: Switch to mysqlnd 

我也就把对于mysql,mysqli,pdo的配置选项改成了如下代码:

  1. --with-mysql=mysqlnd  
  2. --with-mysqli=mysqlnd  
  3. --with-pdo-mysql=mysqlnd 

编译通过.

 
分享到:
PHP Startup: Unable to load dynamic li...
昨天帮一朋友配置服务器结果发现apache日志中有PHP Warning: PHP Startup: Unable to load dynamic library 提示了,然后调试数据库连接发现提示Call to undefined function mysql_connect()错误,这样就想到了是mysql没有加载成功了,下面我们一起来看看问题解决办法. 连接代码:   因为服务器使用的...
windows/linux/php中memcached.exe的安装...
文章介绍了关于windows+php中memcached.exe的安装与配置和liunx中 memcached配置 ,大家可根据自己的系统来方法一或方法二来配置. windows+php中memcached.exe的安装与配置 1.Windows版本的下载地址为:http://code.jellycan.com/memcached/ 将压缩文件解压到  c:/memcached/ 2. 在CMD下输入 “c:/memcached...
  •         php迷,一个php技术的分享社区,专属您自己的技术摘抄本、收藏夹。
  • 在这里……