前次在编译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.
经由除夜量测试, 发明解决筹划:
(php-xxxxx为php文件名, 代表路径)
# cd /usr/local/src/php-xxxxx/ext/mysqli
# yum -y install mysql-devel
# php安装路径/php/bin/phpize (phpize参考)
# ./configure --with-php-config= /php-config --enable-embedded-mysqli=shared --enable-shared
# make
# make install
这时屏幕会打印mysqli.so生成的路径, 在php.ini里加载就好啦