Linux下已编译PHP增加扩展so的方法,关键phpize 和config.m4

WBOY
Release: 2016-06-23 13:55:04
Original
1093 people have browsed it

LINUX下PHP已经编译,如何新增so扩展。

用到的一个sh:/usr/local/php5/bin/phpize

原理:用phpize在压缩包里面找到对应的对应的扩展文件夹,在里面执行phpize,具体步骤:

PHP安装路径:/usr/local/php5

PHP源码路径:/home/default7/lamp/php-5.5.13

扩展假设zlib:/home/default7/lamp/php-5.5.13/ext/zlib

执行代码:

ln -s /usr/local/php5/bin/phpize /usr/bin/phpizecd /home/default7/lamp/php-5.5.13/ext/zlibmv config0.m4 config.m4phpize//这里提示报错,安装bz2,bz2-develyum install bz2 bz2-devel./configure --with-php-config=/usr/local/php5/bin/php-configmakemake testmake installvim /etc/php.ini ##加入extension=bz2.so
Copy after login


(by default7#zbphp.com)




Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template