长话短说,我删除了 Mac 上的 PHP 符号链接,并将其替换为 XAMPP 的符号链接。现在看来我的 SSL 配置有问题,或者在我看来,缺少 SSL 配置。
例如,当我运行composer self-update
它时会引发此错误:
[Composer\Downloader\TransportException]
The "https://getcomposer.org/version" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
我有这个调试脚本来自某处,上面写着:
Bool(false) String(69) “SSL 证书问题:证书链中的自签名证书” String(0) “”
看起来 curl.cainfo 已从 php.ini 中取消设置
Curlerror.txt 说:
* About to connect() to extensions.bolt.cm port 443 (#0)
* Trying 46.17.0.55...
* Adding handle: conn: 0x100976400
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x100976400) send_pipe: 1, recv_pipe: 0
* Connected to extensions.bolt.cm (46.17.0.55) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: /Applications/XAMPP/xamppfiles/share/curl/curl-ca-bundle.crt
CApath: none
* SSL certificate problem: self signed certificate in certificate chain
* Closing connection 0
那么,关于如何解决这个问题,您有什么想法吗?我是否应该在 php.ini(或某个地方)中设置 curl.cainfo,并将其指向我的证书位置?那个位置在哪里?