cURL error 60: SSL certificate: unable to get local issuer certificate

前端 未结 19 1540
天涯浪人
天涯浪人 2020-11-22 10:51

I use WAMP on a local development environment and am trying to charge a credit card but get the error message:

cURL error 60: SSL certificate problem:

19条回答
  •  醉梦人生
    2020-11-22 11:34

    I spent too much time to figure out this problem for me.

    I had PHP version 5.5 and I needed to upgrade to 5.6.

    In versions < 5.6 Guzzle will use it's own cacert.pem file, but in higher versions of PHP it will use system's cacert.pem file.

    I also downloaded file from here https://curl.haxx.se/docs/caextract.html and set it in php.ini.

    Answer found in Guzzles StreamHandler.php file https://github.com/guzzle/guzzle/blob/0773d442aa96baf19d7195f14ba6e9c2da11f8ed/src/Handler/StreamHandler.php#L437

            // PHP 5.6 or greater will find the system cert by default. When
            // < 5.6, use the Guzzle bundled cacert.
    

提交回复
热议问题