PHP Example of installing extensions by PECL

Source: Internet
Author: User
Tags pear php example
The following small series for you to share a PHP through the pecl way to install the extension of the example, with a good reference and learn the value of PHP, I hope to help you. The small friends who are interested in PHP come along and look at it.

1, install the PECL and create shortcut keys (if the installation of PHP with can ignore this step installation steps)

# cd/usr/local/php/bin/  //Can see if it has pecl # wget Http://pear.php.net/go-pear.phar-O go-pear.php # php go-pear.php # ln -s/usr/local/php/bin/pecl/usr/bin/pecl

2, whether the query has been included in the extension

# PECL Search Swoole  //swoole to query the extension (take the swoole extension as an example)//query result: Retrieving data ... 0%. Matched packages, Channel Pecl.php.net: ======================================= package stable/(Latest) Local Swoole 1.9.23 (Stable) Event-driven asynchronous and concurrent networking engine with high performance for PHP. Swoole_serialize 0.1.1 (Beta) the fastest and smallest serialize fucntion bound for PHP7

3. Installation Configuration extension

# pecl Install swoole//Output Result: Build process completed successfully installing '/usr/lib64/php/modules/swoole.so ' Install O k:channel://pecl.php.net/swoole-1.9.23 configuration Option "Php_ini" is not set to php.ini location should add "Exte Nsion=swoole.so "to php.ini  # configure php.ini reference swoole.so and then restart PHP

Note: compared to phpize mode installation, PECL mode installation is more convenient, can save manually added to the php.ini link

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.