2

I have a Vagrant box setup and running. I am trying to use Guzzle to connect to an API for a 3rd party service.

From what I can understand it is having some issue validating a certificate or something from the vagrant box which is a virtual machine and the API servers.

Any advice would be greatly appreciated, thanks.

This is the error I am getting back:

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
4

1 に答える 1

2

これは、以前のバージョンのGuzzlepharファイルの問題でした。PHPのcurlバインディングは、pharストリームラッパーからのcacertファイルの読み取りをサポートしていません。

CAfile:phar:///vagrant/web/vendor/guzzle.phar/src/Guzzle/Http/Resources/cacert.pem

pharから実行している場合は、システムでcacertバンドルを使用するように、pharの新しいバージョンを更新しました。

于 2012-11-15T04:18:57.740 に答える