Home  >  Article  >  Backend Development  >  不从新编译php,增加动态模块(以mbstring模块为例)

不从新编译php,增加动态模块(以mbstring模块为例)

WBOY
WBOYOriginal
2016-06-13 12:50:031006browse

不重新编译php,增加动态模块(以mbstring模块为例)

1 进入php源代码目录中的mbstring所在目录
cd /usr/local/src/php-5.2.4/ext/mbstring/

2 执行php安装后目录中的bin/phpize文件
/usr/local/php/bin/phpize (这个需要 aotuconf ?的支持,unbutnu:sudo apt-get install aotuconf)

?

3?./configure --with-php-config=/var/lib/php5/bin/php-config #这里写自己的config文件。

?

4. make && make install (如果上一步有报错根据报错原因找对应解决方案),安装完后会提示生成的so文件位置,然后复制到php的扩展目录下.比如$HOME/usr/local/php5/ext/ 下面,然后在php.ini 中加载该so文件,如果加载不成功可以写成绝对路径.

?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn