PHP

PHP – PECL

PECL is the PHP Community Library, available on the Web at http://pecl.php.net/. PECL seeks to extend PHP’s capabilities through low-level language modules which are written in the C programming language and must be integrated directly into the PHP engine(usually through compilation). PECL extensions are distributed as compressed TAR archives and can be installed to any PHP development system either through manual compile-and-install process or with the PECL installer(included with every PHP distribution).
Installing PECL Extensions
The procedure for installing a PECL extension is differ n UNIX and Windows. To download compile and install a PECL extension on UNIX all in one fell swoop, issue the following command at shell prompt:

Shell>pecl install extension-name
[sam_zone id=”3″ codes=”true”] The PECL installer will now connect to the PECL server, download the source code, compile it and install it to appropriate location on your system. Fig 12-4 has an example of installing the Zip extension, available from http://pecl.php.net/pacakage/zip.

Alternatively, download the package source code and manually compile it into a loadable PHP module:

shell# cd zip-1.8.10
shell# phpsize
shell# ./configure
shell# make
shell# make install

This process should generate a loadable PHP module name zip.so and copy it to the PHP extension directory. It will now need to enabled in the php.ini configuration file.
Windows user have much easier time of it: they need to simply download a precompiled PECL extension, copy it into PHP’s extension directory and then activate the extension in the php.ini configuration file. Precompiled PECL extension for Windows are freely available on the Web, at http//pecl4win.php.net/.
Once the extension has been correctly installed and activated, restart the Web server and check the output of the phpinfo() command. If extension has been correctly installed, phpinfo() will display an entry for the extension as in fig

You can find more information on installing PECL extensions in the PHP manual at www.php.net/manual/install.pecl.php.

Recommended Tutorials for you


Related posts

jQuery Dependent DropDown List – States and Districts

Anuj Kumar

PHP Constants

Anuj Kumar

How to Fetch data from database Using OOPS In PHP

Anuj Kumar

PHP Constants

Anuj Kumar

How to get current page URL in php

Anuj Kumar

Significance and Advantages of PHP Web Development

Anuj Kumar

Understanding of php.ini

Anuj Kumar

COOKIES IN PHP

Anuj Kumar

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.