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

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

    Guzzle, which is used by cartalyst/stripe, will do the following to find a proper certificate archive to check a server certificate against:

    1. Check if openssl.cafile is set in your php.ini file.
    2. Check if curl.cainfo is set in your php.ini file.
    3. Check if /etc/pki/tls/certs/ca-bundle.crt exists (Red Hat, CentOS, Fedora; provided by the ca-certificates package)
    4. Check if /etc/ssl/certs/ca-certificates.crt exists (Ubuntu, Debian; provided by the ca-certificates package)
    5. Check if /usr/local/share/certs/ca-root-nss.crt exists (FreeBSD; provided by the ca_root_nss package)
    6. Check if /usr/local/etc/openssl/cert.pem (OS X; provided by homebrew)
    7. Check if C:\windows\system32\curl-ca-bundle.crt exists (Windows)
    8. Check if C:\windows\curl-ca-bundle.crt exists (Windows)

    You will want to make sure that the values for the first two settings are properly defined by doing a simple test:

    echo "openssl.cafile: ", ini_get('openssl.cafile'), "\n";
    echo "curl.cainfo: ", ini_get('curl.cainfo'), "\n";
    

    Alternatively, try to write the file into the locations indicated by #7 or #8.

提交回复
热议问题