How to install Curl extension methods in Linux PHP sample tutorial

Source: Internet
Author: User
Tags curl

If PHP is already compiled on the system, then you need to add a new extension.

One way is to recompile PHP completely, another way is to compile the extensions separately, in extension form.

The following is an example of installing Curl Extensions:

1, Download curl installation package. (My php is 4.4.4, download the latest Curl 7.16 can not be used, the last download 7.14 can, so pay attention to the version of the problem)

The code is as follows:

./configure

Make

PHP Requirements Curl directory to have include and Lib directory, and include the Easy.h and curl.h two files, under the Lib to have LIBCURL.A. The file with the compiled include is available, but there is no Lib directory. Originally generated to the Lib/.libs directory, so to copy to the Lib directory

2, into the installation of the original PHP source directory,

The code is as follows:

CD ext

CD Curl

Phpize

./configure--with-curl=dir

Make

The curl.so file is generated under phpdir/ext/curl/moudles/.

3, copy curl.so file to extensions configuration directory, modify the php.ini is good

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.