[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
curl.cainfo = /etc/pki/tls/certs/ca-bundle.crt
[openssl]
; The location of a Certificate Authority (CA) file on the local filesystem
; to use when verifying the identity of SSL/TLS peers. Most users should
; not specify a value for this directive as PHP will attempt to use the
; OS-managed cert stores in its absence. If specified, this value may still
; be overridden on a per-stream basis via the "cafile" SSL stream context
; option.
windows示例:
[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
curl.cainfo = "E:\cacert.pem"
[openssl]
; The location of a Certificate Authority (CA) file on the local filesystem
; to use when verifying the identity of SSL/TLS peers. Most users should
; not specify a value for this directive as PHP will attempt to use the
; OS-managed cert stores in its absence. If specified, this value may still
; be overridden on a per-stream basis via the "cafile" SSL stream context
; option.
;openssl.cafile=
到 https://curl.haxx.se/ca/cacert.pem 下载证书文件 cacert.pem,将其保存到合适的路径下。
编辑 php.ini 文件,删除 curl.cainfo 配置项前的分号注释符(;),值设置为保存的证书文件 cacert.pem 的绝对路径。
重启依赖 PHP 的服务。
linux示例:
windows示例:
- 1
前往