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就可以了

相关文章:

  • 2022-02-16
  • 2022-01-12
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
  • 2021-04-21
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-16
  • 2021-09-28
  • 2022-12-23
  • 2021-11-02
相关资源
相似解决方案