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.

你可能感兴趣的:(PHP,.net,SVN,ext)