]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
s3/php: update to 1.5? version of API
authorDan Mick <dan.mick@inktank.com>
Sat, 26 Jan 2013 05:22:45 +0000 (21:22 -0800)
committerDan Mick <dan.mick@inktank.com>
Sat, 26 Jan 2013 05:25:45 +0000 (21:25 -0800)
Something like v1.5 of the Amazon PHP library requires the AmazonS3
constructor to be given an array of parameters rather than using
the globals.  More research needs to happen, and particularly
about the v2 API, but this might solve someone's problem with
v1.5 while we do that research.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
doc/radosgw/s3/php.rst

index fc3087e54d4c36f731acac510f0dbb8832cb3690..40542e072a2b367ab41e3c727c47f4506900d03e 100644 (file)
@@ -21,7 +21,12 @@ This creates a connection so that you can interact with the server.
        require_once 'AWSSDKforPHP/sdk.class.php';
 
        // Instantiate the S3 class and point it at the desired host
-       $Connection = new AmazonS3();
+       $Connection = new AmazonS3(array(
+               'key' => AWS_KEY,
+               'secret' => AWS_SECRET_KEY,
+               'canonical_id' => AWS_CANONICAL_ID,
+               'canonical_name' => AWS_CANONICAL_NAME,
+       ));
        $Connection->set_hostname($HOST);
        $Connection->allow_hostname_override(false);