我有一个 Vagrant box 设置并运行。我正在尝试使用 Guzzle 连接到第 3 方服务的 API。
据我所知,验证证书或来自虚拟机和 API 服务器的 vagrant box 中的东西时遇到了一些问题。
任何建议将不胜感激,谢谢。
这是我回来的错误:
Fatal error: Uncaught exception 'Guzzle\Http\Exception\CurlException' with message '[curl] 77: error setting certificate verify locations:
CAfile: phar:///vagrant/web/vendor/guzzle.phar/src/Guzzle/Http/Resources/cacert.pem
CApath: /etc/ssl/certs
[url] https://www.domain.com/json/list?id=444&app_key=AAA [info] array (
'url' => 'https://www.domain.com/json/list?id=444&app_key=AAA',
'content_type' => NULL,
'http_code' => 0,
'header_size' => 0,
'request_size' => 0,
'filetime' => -1,
'ssl_verify_result' => 0,
'redirect_count' => 0,
'total_time' => 0.141022,
'namelookup_time' => 0.048923,
'connect_time' => 0.141025,
'pretransfer_time' => 0,
'size_upload' => 0,
'size_download' => 0,
'speed_download' => 0,
'speed_upload' => 0,
'download_content_length' => -1,
'upload_content_length' => -1,
'starttransfer_time' => 0,
'redirect_time' => 0,
'certinfo' =>
array (
),
'redirect_url' => '',
) [debug] in phar:///vagrant/web/vendor/guzzle.phar/src/Guzzle/Http/Curl/CurlMulti.php on line 555