0

I am new to php and I am installing php aws-sdk for dynamodb access using this http://docs.aws.amazon.com/aws-sdk-php/guide/latest/installation.html#installing-via-zip

I have included following lines in my php file -

require "/home/ubuntu/aws/aws-autoloader.php";
use Aws\DynamoDb\DynamoDbClient;

To check if it works fine I am using following command -

sudo php myfile.php

It gives me error -

PHP Parse error:  syntax error, unexpected '[' in /home/ubuntu/aws/aws-autoloader.php on line 3

Can someone help in this matter.

Note : I can't use first two installation methods given here -http://docs.aws.amazon.com/aws-sdk-php/guide/latest/installation.html

Jeremy Lindblom
  • 6,437
  • 27
  • 30
user2952821
  • 743
  • 2
  • 6
  • 19
  • 1
    Please always mention the exact versions of the libraries (AWS, CakePHP) that you are using, people don't like to waste their time guessing! Also whenever you receive errors, show the exact code that triggers the error! That being said, there is no square bracket in `aws-autoloader.php` on line 3 in the latest release. – ndm Sep 13 '14 at 15:08
  • http://stackoverflow.com/a/17772560/41874 – deizel. Sep 14 '14 at 00:03
  • There was a 12 hours window or so where the autoloader in the latest zip accidentally had PHP 5.4-style arrays. It's since been corrected, so please re-download the zip, and it should work now. – Jeremy Lindblom Sep 14 '14 at 16:32

0 Answers0