A summary of the Linux Add Curl Extension library method for PHP

Source: Internet
Author: User

Method One

Install Curl

The code is as follows Copy Code

# wget http://curl.haxx.se/download/curl-7.17.1.tar.gz

# TAR-ZXF Curl-7.17.1.tar.gz

#./configure--prefix=/usr/local/curl

# make; Make install

Installing PHP

Just turn on the switch--with-curl=/usr/local/curl

It's OK.

This expansion library is still very good, and is a useful alternative to fsockopen and so on.

Method Two

Into the original PHP installation source directory,

The code is as follows Copy Code

CD ext

CD Curl

Phpize

./configure--with-curl=dir

Make

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

Copy the curl.so file to the extensions configuration directory and modify the php.ini.


when a 64-bit system adds curl to PHP

Resolves checking for gnutls support in Libcurl ... no.29. 10.

cd/usr/local/src/php-5.2.6/ext/curl/
/usr/local/php-fcgi/bin/phpize
./configure--with-php-config=/usr/local/php-fcgi/bin/php-config

There was a mistake!

Checking for GNUTLS support in Libcurl ... no
Checking for Curl_easy_perform in-lcurl ... no
Configure:error:There is something wrong. Please check the Config.log for the more information.

I'm checking to see if there's any curl devel.

Rpm-qa |grep Curl

It's all there!

Check the Half-day data, or find the results, as long as the following packages are installed, you can perfect through!
Curl-devel-7.15.5-2.el5
E2fsprogs-devel-1.39-15.el5
Krb5-devel-1.6.1-25.el5
libidn-devel-0.6.5-1.1
Openssl-devel-0.9.8b-10.el5

As for the role of each package, check it yourself! Oh

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.