Curl: (+) SSL Certificate problem:unable to get local issuer certificate error

Source: Internet
Author: User
Tags ssl certificate

Today colleagues do manage the project, the request interface returns the following error SSL certificate problem:unable to get local issuer Certificate.

This issue occurs because the trusted server HTTPS authentication is not Configured. By default, Curl is set to not trust any cas, which means that it does not trust any server Authentication. therefore, This is why the browser cannot access your server over Https.

There are 2 ways to address this error

1. If your content is not sensitive, a quick way is to skip the SSL check before using Curl_exec ().

curl_setopt ($chfalse);


2. Download a ca-bundle.crt, put it in the corresponding directory, and configure the next path in the php.ini file.

Https://github.com/bagder/ca-bundle/blob/e9175fec5d0c4d42de24ed6d84a06d504d5e5a09/ca-bundle.crt

In php.ini join, Restart the Web server

curl.cainfo= "true path/ca-bundle.crt"

Curl: (+) SSL Certificate problem:unable to get local issuer certificate error

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.