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 get开发者_JAVA技巧ting any exceptions or errors ... any ideas? Error reporting is turned up all the way.
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.
精彩评论