In centos, php Curl cannot access https. ssl_version is NSS rather than openssl.

Source: Internet
Author: User

First, determine whether php has installed extension curl and openssl. If not, skip this step...

View phpinfo. If curl is found, the curl 7.19.7 libcurl/7.19.7 NSS/3.19.1 Basic ECC (instead of openssl) will be found)

Because centos 6.5 (the version I used is not tested in other versions), the default installation of curl is that the ssl version is NSS.

Therefore, you need to recompile the Curl.

Go to the official download http://curl.haxx.se/download/archeology/ I still download version 7.19.7, recompile

./Configure -- prefix =/usr -- without-nss -- with-ssl

Make & make install

Ldconfig

Check curl-V curl 7.19.7 libcurl/7.19.7 OpenSSL/1.0.1e. openssl can access the https website.

Of course php is valid and httpd needs to be restarted

OK... Done

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.