I am using AWS PHP SDK V2.8 in my cakephp. I am working on an AWS ec2 ubuntu machine.
I use zip files, not some composer.
I get the following error.
Class 'Aws\Common\Aws' not found
I am creating a custom component to access all the features of the SDK. with the link https://github.com/Ali1/cakephp-amazon-aws-sdk
My folder structure is as follows

Here is my AmazonComponent.php
<?php App::uses('Component', 'Controller'); use Aws\Common\Aws; class AmazonComponent extends Component { public function __construct(ComponentCollection $collection, $settings = array()) { $this->_controller = $collection->getController(); parent::__construct($collection, $settings); } public function initialize(Controller $controller) {
I am adding these two lines at the top of the file with a link to this question. How do I load the AWS SDK in CakePHP?
ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path'). PATH_SEPARATOR . ROOT .DS . 'app/Plugin/Amazonsdk/Vendor/aws'); require ROOT . DS . 'app/Plugin/Amazonsdk/Vendor/aws/aws-autoloader.php';
Where am I mistaken and how can I fix this?
source share