Linux Install PHP extensions

Source: Internet
Author: User
Tags install php zts

Already Curl for example

Find the installation package for PHP, CD into the installation package

CD Php-5.6.25/ext/curl

/usr/local/php/bin/phpize (search for your phpize in the root directory)

Tip No Curl-devel installed

Yum Install Curl Curl-devel (Install Curl's dependency pack)

If the following error occurs: Cannot find autoconf. Please check your autoconf installation and the $PHP _autoconf environment vari

Workaround:

Yum Install M4

Yum Install autoconf

and re-phpize.

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

(More directories to search your php-config in what directory, not necessarily in this directory/usr/local/php/bin/php-config)

Make && make install

After the installation is successful, the following appears:

Installing Shared extensions:/usr/local/php/lib/php/extensions/no-debug-zts-20131226/

Curl.so appears in this folder

Copy the curl.so to an extended folder in PHP

The folder path can be found in the php.ini Extension_dir,

The first time you install the extension, this is commented out, you can remove the comment, and then specify the folder path

Copy to Folder:

Cp/usr/local/php/lib/php/extensions/no-debug-zts-20131226/curl.so/usr/local/php/extension/curl.so

Back is my Extended folder path

Modify PHP.ini: Add extension=curl.so

Restart Apache:/usr/local/apache/bin/apachectl restart

Linux Install PHP extensions

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.