php如何安装扩展mysqli

这篇文章主要为大家展示了“php如何安装扩展mysqli”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“php如何安装扩展mysqli”这篇文章吧。

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

terminal

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

报错:

checking for MySQLi support... yes
checking whether to enable embedded MySQLi support... no
mysql_config not found
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

以上是“php如何安装扩展mysqli”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注行业资讯频道!