在使用Guzzle時,遇到cURL error 60: SSL certificate problem: unable to get local issuer certificate 只要下載ca-bundle.crt並放到相對應的路徑
[
// Red Hat, CentOS, Fedora (provided by the ca-certificates package)
'/etc/pki/tls/certs/ca-bundle.crt',
// Ubuntu, Debian (provided by the ca-certificates package)
'/etc/ssl/certs/ca-certificates.crt',
// FreeBSD (provided by the ca_root_nss package)
'/usr/local/share/certs/ca-root-nss.crt',
// OS X provided by homebrew (using the default path)
'/usr/local/etc/openssl/cert.pem',
// Google app engine
'/etc/ca-certificates.crt',
// Windows?
'C:\\windows\\system32\\curl-ca-bundle.crt',
'C:\\windows\\curl-ca-bundle.crt',
];
如果再無法正常運作的話就得去修改php.ini 再加入
[curl]
curl.cainfo=C:\Windows\curl-ca-bundle.crt
[openssl]
openssl.cafile=C:\Windows\curl-ca-bundle.crt
就可以正常運作了
沒有留言:
張貼留言