Install php Curl extension on Linux, and support HTTPS request, recompile method

Source: Internet
Author: User
Environment: php5.5.5 + nginx

Task: Install the PHP Curl extension and support HTTPS

The pit of blood and tears: I first installed curl, found that does not support HTTPS, and then install OpenSSL, but everything is late, toss a half-day, or to reinstall.

Method:

First install OpenSSL, directly

SHELL

Yum-install Opensslyum-install Openssl-devel

Then reinstall Curl, after installation, remember CURL-V test the support does not support HTTPS

SHELL

wget http://curl.haxx.se/download/curl-7.24.0.tar.gztar-xzf curl-7.24.0.tar.gz cd curl-7.24.0./configure--prefix= ( Installation path)--with-ssl= (SSL installation path) Makemake Install

Then export the current PHP compiler parameters

SHELL

/usr/local/php/bin/php-i | grep Configure

Go to the PHP installation file directory, and if you don't, download a

SHELL

/usr/local/php/bin/phpize./configure--with-curl= (Installation path)--with-openssl= (Installation path)//The compilation parameters just exported plus these 2 Makemake install

If you don't make an error, restart Nginx and PHP-FPM!

  • 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.