(1)cd /usr/local/php-5.2.17/ext/mysqli
(2)输入/usr/local/php/bin/phpize
回车
(3)./configure --prefix=/usr/local/mysqli
--with-php-config=/usr/local/php/bin/php-config
--with-mysqli=/usr/bin/mysql_config
(4)make
(5)make test
(6)make
intall
(7)成功后在/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/下生成mysqli.so文件
(8)创建ext目录
cd /usr/local/php/ mkdir ext
(9)将mysqli.so文件copy 到ext下
cp
/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/mysqli.so
/usr/local/php/ext
(10)vi
/usr/local/php/lib/php.ini
修改extension_dir="/usr/local/php/ext"
添加
extension=mysqli.so
保存php.ini文件
(11)重启/usr/local/php/sbin/php-fpm
restart
编译及load mydqli.so文件,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/huidaoli/p/3729035.html