Home > php教程 > php手册 > body text

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

WBOY
Release: 2016-06-06 19:49:41
Original
1685 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 扩展

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/phpize

cd /home/default7/lamp/php-5.5.13/ext/zlib

mv config0.m4 config.m4

phpize

//这里提示报错,安装bz2,bz2-devel

yum install bz2 bz2-devel

./configure --with-php-config=/usr/local/php5/bin/php-config

make

make test

make install

vim /etc/php.ini ##加入extension=bz2.so
Copy after login


(by default7#zbphp.com)




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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!