2016-05-12 130 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"