drbvm26000 2011-05-03 20:23
浏览 21
已采纳

无法使用Zend S3.php访问S3中的存储桶

I'm using Zend's S3 for accessing Amazon's cloud. The code looks like this:

require_once('Zend/Service/Amazon/S3.php');
$s3 = new Zend_Service_Amazon_S3('ABCABVABC....', 'xF+5FxF+5FxF+5FxF+5FxF+5FxF+5FxF+5F');
$list = $s3->getBuckets();

But I get false, no buckets. However, if I use the same credentials and log in using a client like cyberduck, I got one bucket (which is correct) and within it all the contents I expect.

I've also tried to access the bucket directly with getObjectsByBucket('...'); which doesn't work either, I get false as well.

I'm not getting any exceptions or errors ... any ideas? Error reporting is turned up all the way.

  • 写回答

1条回答 默认 最新

  • douba8819 2011-05-03 21:07
    关注

    Solved. The issue is that the server time was not accurate and that exception is not shown/thrown with Zend. Using another S3 library allowed me to see the exception, track it down and fix it.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?