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

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

    Be sure that you open the php.ini file directly by your Window Explorer. (in my case: C:\DevPrograms\wamp64\bin\php\php5.6.25).

    Don't use the shortcut to php.ini in the Wamp/Xamp icon's menu in the System Tray. This shortcut doesn't work in this case.

    Then edit that php.ini :

    curl.cainfo ="C:/DevPrograms/wamp64/bin/php/cacert.pem" 
    

    and

    openssl.cafile="C:/DevPrograms/wamp64/bin/php/cacert.pem"
    

    After saving php.ini you don't need to "Restart All Services" in Wamp icon or close/re-open CMD.

提交回复
热议问题