|

楼主 |
发表于 2011-5-20 23:38:38
|
显示全部楼层
本帖最后由 huowz 于 2011-5-22 11:18 编辑
参考http://www.phpzixue.cn/detail1019.shtml。
1、进入扩展目录# cd /usr/local/zijidelu_install/LuNamp/soft/php-5.2.17/ext/mysqli
2、bzxx# /usr/local/php_fcgi/bin/phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
configure.in:3: warning: prefer named diversions
configure.in:3: warning: prefer named diversions
3、bzxx# ./configure --with-php-config=/usr/local/php_fcgi/bin/php-config \
--with-mysqli=/usr/local/mysql/bin/mysql_config
4、make
5、bzxx# make test
Build complete.
Don't forget to run 'make test'.
+-----------------------------------------------------------+
| ! ERROR ! |
| The test-suite requires that proc_open() is available. |
| Please check if you disabled it in php.ini. |
+-----------------------------------------------------------+
6、vi /usr/local/php_fcgi/lib/php.ini
找到disable_functions = shell_exec, system, passthru, exec, popen, proc_open()
改为disable_functions = shell_exec, system, passthru, exec, popen
保存退出。
7、接着bzxx# make test
8、通过测试就bzxx# make install
Installing shared extensions: /usr/local/php_fcgi/lib/php/extensions/no-debug-non-zts-20060613/
9、bzxx# cd /usr/local/php_fcgi/lib/php/extensions/no-debug-non-zts-20060613/
bzxx# ll
total 1408
-rwxr-xr-x 1 root wheel 669332 May 20 22:13 eaccelerator.so
-rwxr-xr-x 1 root wheel 231724 May 20 22:13 memcache.so
-rwxr-xr-x 1 root wheel 470863 May 20 22:54 mysqli.so
能看到新编译的so了。
10、在编辑下配置文件#vi /usr/local/php_fcgi/lib/php.ini
把extension = "mysqli.so"加到[memcache]节后面,实际上是借光了extension_dir="/usr/local/php_fcgi/lib/php/extensions/no-debug-non-zts-20060613/"这句。
11、最后lu-restart一下,再看phpinfo,mysqli加上啦。
——谨以此文纪念5.17电信日以来的三个日夜! |
|