标签:php编译后动态扩展模块
不需要重新编译php,可以动态扩展php模块这里以扩展mysqli为例:
# yum install m4 autoconf
进入PHP源码目录中扩展模块目录ext
# cd /app/httpd/php-5.6.34/ext/mysqli
#/usr/local/php/bin/phpize
Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
# /usr/local/php/bin/php-config --extension-dir
/usr/local/php-5.6.34/lib/php/extensions/no-debug-non-zts-20131226
# ./configure --with-php-config=/usr/local/php/bin/php-config --with-mysqli=/usr/local/mysql/bin/mysql_config
#make && make install clean
Installing shared extensions: /usr/local/php-5.6.34/lib/php/extensions/no-debug-non-zts-20131226/
Installing header files: /usr/local/php-5.6.34/include/php/
#ll /usr/local/php-5.6.34/lib/php/extensions/no-debug-non-zts-20131226/
-rwxr-xr-x 1 root root 715322 Mar 5 16:11 mysqli.so
#vim /etc/php.ini
找到[MySQLi]配置块
添加
extension=mysqli.so
标签:php编译后动态扩展模块
原文地址:http://blog.51cto.com/191226139/2083108