2016-05-12 145 views
4

我似乎在尝试在Laravel的s3中获取和存储内容时遇到了很多错误。Laravel 5.2 S3上传错误

这是我的控制器

public function store(Request $request) 
 
    { 
 
     $s3 = Storage::disk('s3'); 
 
     $s3->get('index.html'); 
 
    
 
    }

我得到一个错误。存储桶中有一个index.html文件。

FatalErrorException in SignatureInterface.php line 2: Maximum function nesting level of '100' reached, aborting! 

如果我运行它改变这种

public function store(Request $request) 
 
    { 
 
     $s3 = Storage::disk('s3'); 
 
     $s3->put('index.html', 'test', 'public'); 
 
    }

我得到这个错误

S3Exception在WrappedHttpHandler.php行192:错误执行的“ ”ListObjects“ https://s3-us-west-2.amazonaws.com/willjeweler?prefix=index.html%2F&max-keys=1&encoding-type=url“; AWS HTTP错误:cURL错误60:SSL证书问题:无法获得本地发行者证书(请参阅http://curl.haxx.se/libcurl/c/libcurl-errors.html

这可能是我的用户在亚马逊上的问题吗?某种类型的权限问题?

  • 我创建了用户并添加了密钥和秘密的env。
  • 我给了我的用户管理员权限。

回答

1

FatalErrorException in SignatureInterface.php line 2: Maximum function nesting level of '100' reached, aborting!

您可以尝试延长极限。打开你的conf文件/etc/php5/mods-available/xdebug.ini下,并添加以下xdebug.max_nesting_level=500

AWS HTTP error: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

您需要从http://curl.haxx.se/ca/cacert.pem并从php.ini设置下载文件引用新的证书

curl.cainfo = "/home/ubuntu/config/cacert.pem"