0

I can't seem to make aws.phar work on my local xampp (under Ubuntu). My example is very simple:

<?php 

error_reporting(-1);
ini_set('display_errors', 'on');

require_once 'aws.phar';

use Aws\Common\Enum\Region;

$config = array(
    'key'    => 'xxxxxxx',
    'secret' => 'xxxxxxx',
    'region' => Region::US_EAST_1
);

?>

I get the following output:

?9??
Fatal error: Class 'Aws\Common\Enum\Region' not found in /var/www/Test/test.php on line 14

Please note the first line which outputs just ?9??. This is caused by require_once 'aws.phar'; line. So, it looks like something is wrong with processing aws.phar file

aws.phar file is the latest SDK version downloaded from amazon. This same aws.phar file works without problems on the server, but for some reason not in my xampp.

My xampp version is 1.7.7 which runs under Ubuntu 11.10. PHP version is 5.3.8. I didn't notice any other problems with my xampp installation. Everything else is working fine.

Any ideas?

Thank you!

Dima L.
  • 3,443
  • 33
  • 30

1 Answers1

0

Well, I couldn't understand what was wrong with my xampp installation. I just installed latest xampp 1.8.1 and it solved the problem. I tried to understand what was different in my xampp configuration, but didn't find any difference... Strange indeed.. aws.phar works correctly now.

Dima L.
  • 3,443
  • 33
  • 30