php安装扩展mysqli的实现步骤及报错解决办法

这篇文章主要介绍了 php安装扩展mysqli的实现步骤及报错解决办法的相关资料,希望通过本文能帮助到大家,需要的朋友可以参考下

php安装扩展mysqli的实现步骤及报错解决办法

terminal

  1. #cd php-5.3.6/ext/mysqli
  2. #/usr/local/webserver/php/bin/phpize
  3. #./configure --with-php-config=/usr/local/webserver/php/bin/php-config
  4. #make
  5. #make instal

报错:

  1. checking for MySQLi support... yes
  2. checking whether to enable embedded MySQLi support... no
  3. mysql_config not found
  4. configure: error: Please reinstall the mysql distribution

加入配置

#./configure --with-php-config=/usr/local/webserver/php/bin/php-config --with-mysqli=/usr/local/mysql/bin/mysql_config

编译通过

将生成的mysqli.so配置加入php.ini中

extension=mysqli.so