Amazon S3上载错误SSL证书问题

Sum*_*air 2 amazon amazon-s3 laravel-5

我正在尝试在我的localhost上测试Laravel Amazon S3但是仍然遇到同样的错误:

WrappedHttpHandler.php第192行中的S3Exception:在" https://s3-us-west-2.amazonaws.com/app?prefix=appimages%2FIMG-1469840859-j.jpg%2F&max-keys=1&encoding "上执行"ListObjects"时出错-type = url "; AWS HTTP错误:cURL错误60:SSL证书问题:无法获取本地颁发者证书(请参阅 http://curl.haxx.se/libcurl/c/libcurl-errors.html)

我的代码:

$s3 = \Storage::disk('s3');
$filePath = '/images/' . $filename;
$s3->put($filePath, file_get_contents($image), 'public');
Run Code Online (Sandbox Code Playgroud)

err*_*07s 10

你已经对php.ini文件进行了调整.下载此文件http://curl.haxx.se/ca/cacert.pem并在此设置php.ini中的路径,然后重新启动服务器.

;;;;;;;;;;;;;;;;;;;;
; php.ini Options  ;
;;;;;;;;;;;;;;;;;;;;

curl.cainfo = "C:\xampp\php\extras\ssl\cacert.pem"
Run Code Online (Sandbox Code Playgroud)

以上路径对于XAAMP来说很常见

这将解决您的问题.