PECL安装

需要autoconf
需要header
多版本需要指定路径
/opt/php/bin/phpize
./configure --with-php-config=/opt/php/bin/php-config
make
make install
自己设置php.ini的extension_dir变量


pecl is a repository for php extensions.

svn checkout http://svn.php.net/repository/pecl/extname/trunk extname
http://pecl.php.net

When using "pecl install package", you might run into a memory limit problem. Solution is to use "pear install pecl/$extensionname" since it uses php.ini's memory limit.

When using "pecl install package", you might run into a memory limit problem. Solution is to use "pear install pecl/$extensionname" since it uses php.ini's memory limit.

$ pecl install extname-beta
specific the version num
$ pecl install extname-0.1

compiling shared PECL extensions with phpize
The phpize command is used to prepare the build environment for a php extension.In the following sample,the sources for an extension are in a directory named extname:
$ cd extname
$ phpize
$ ./configure
$ make
# make install
A successful install will have created extname.so and put it into the php extensions directory.You'll need to and adjust php.ini and add an extension=extname.so line before you can use the extension.


Compiling PECL extensions statically into PHP

$ cd /your/phpsrcdir/ext
$ pecl download extname
$ gzip -d < extname.tgz | tar -xvf -
$ mv extname-x.x.x extname

$ cd /your/phpsrcdir
$ rm configure
$ ./buildconf --force
$ ./configure --help
$ ./configure --with-extname --enable-someotherext --with-foobar
$ make
$ make install

$ ./configure --help | grep extname


(--without-pear disables pecl as well as pear)

PECL versioning has historically been faily anarchic.This made it impossible to determine the status of an extension,or whether an update would break binary compatibility with previous versions.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值