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

前端 未结 19 1276
天涯浪人
天涯浪人 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:50

    As you are using Windows, I think your path separator is '\' (and '/' on Linux). Try using the constant DIRECTORY_SEPARATOR. Your code will be more portable.

    Try:

    curl_setopt($process, CURLOPT_CAINFO, dirname(__FILE__) . DIRECTORY_SEPARATOR . 'cacert.pem');
    

    EDIT: and write the full path. I had some issues with relative paths (perhaps curl is executed from another base directory?)

    0 讨论(0)
提交回复
热议问题