$ak,'...">

Amazon S3 - deleteObjects () - "horror" errors?

Here's the but accurate code I'm working with.

$client = S3Client::factory(array('key'=>$ak,'secret'=>$sk));

foreach(range(1,10) as $i) $temp[] = array('Key'=>$i);

$result = $client->deleteObjects(array('Bucket'=>'bucket','Objects'=>$temp));

return $result;

Everything works, it deletes objects on demand, but throws all these errors from the phar file. Running this locally, as you can see below.

Fatal error: Uncaught exception 'Guzzle\Http\Exception\CurlException' with message '[curl] 56: Problem (2) in the Chunked-Encoded data [url] https://bucket.s3.amazonaws.com?delete=' in phar://C:/wamp/www/bucket/local/aws.phar/Aws/Common/Client/AbstractClient.php on line 285

Guzzle\Http\Exception\CurlException: [curl] 56: Problem (2) in the Chunked-Encoded data [url] https://bucket.s3.amazonaws.com?delete= in phar://C:/wamp/www/bucket/local/aws.phar/Guzzle/Http/Curl/CurlMulti.php on line 365

Aws\Common\Exception\TransferException: [curl] 56: Problem (2) in the Chunked-Encoded data [url] https://bucket.s3.amazonaws.com?delete= in phar://C:/wamp/www/bucket/local/aws.phar/Aws/Common/Client/AbstractClient.php on line 285

+4
source share
3 answers

I also had a problem running WampServer on Windows 7 x64. Through stupid luck, I just stumbled upon a solution.

Just add 'scheme' => 'http'factory to the configuration settings and it will start working!

+2
source

I understand a little late, but the search for this has returned very little, I hope this can help someone else.

Objects, WAMPSERVER (64 BITS PHP 5.4) 2.4, Windows 7 x64. , - Curl WAMP. WAMPSERVER (32BITS PHP 5.4) 2.4 deleteObjects.

+1

Possible solution is to add

'curl.options' => array('CURLOPT_HTTP_VERSION'=>'CURL_HTTP_VERSION_1_0')

in S3Client :: factory.

Curl errors are no longer mentioned, but now I sometimes get a Simple XML error: "Entity: line 2: parser error: additional content at the end of the document."

0
source

All Articles