php增加对mysqli的支持

php增加对mysqli的支持  

 

 
我在fedora下使用yum安装的php和mysql,但是发现php不支持myslqi,只能编译一个mysqli的扩展给php用了。
方法如下:
1.下载php
2.进入扩展目录,
cd /php-5.3.10/ext/mysqli
3.phpize 生成configure
4.如果在编译php对mysqli的支持的时候出现了如下错误:
checking whether to enable embedded MySQLi support… no
checking for mysql_set_server_option in -lmysqlclient… no
configure: error: wrong mysql library version or lib not found. Check config.log for more information.
则采用下面方法解决:
# yum -y install mysql-devel
# phpize 
# ./configure --with-php-config= /php-config --enable-embedded-mysqli=shared --enable-shared
# make && make install
这时屏幕会打印mysqli.so生成的路径, 在php.ini里加载,重启php-cgi就可以了
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值