Home > Backend Development > PHP Tutorial > php编译可扩展模块

php编译可扩展模块

WBOY
Release: 2016-06-23 13:04:53
Original
886 people have browsed it

1、进入模块所在目录

/usr/local/src/php-5.4.36/ext

假设需要编译curl模块

先确保之前没有编译curl模块

/usr/local/php/bin/php -m |grep -i curl

2、进入curl目录

cd curl

使用phpize生成.configure文件

/usr/local/php/bin/phpize 

3、配置编译参数

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

4、编译 make

5、安装 make install 

6、编辑php配置文件添加curl.so

vim /usr/local/php/etc/php.ini 

查找此段;extension=php_shmop.dll在以下添加

extension=curl.so

7、使用 /usr/local/php/bin/php -m可以查看是否安装curl模块


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