I am trying to send a text message using the Composer AWS SDK on PHP.
PHP 7.2.11 (cli) (built: Oct 10 2018 02:39:52) ( ZTS MSVC15 (Visual C++ 2017) x8 6 ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.11, Copyright (c) 1999-2018, by Zend Technologies
Got composer installed and installed the aws-sdk-php. Now when i run it, i literally get the infamous error Class 'Aws\Sns\SnsClient' not found. I have tried all sorts of code samples including the one on the AWS sample documentation page. I do confirm that i have re-run composer require aws/aws-sdk-php just to be doubly sure. Here's the output:
Using version ^3.145 for aws/aws-sdk-php ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update Writing lock file Generating autoload files
This leads me to believe that the sdk itself seems to be missing or for some reasons the autoload.php is unable to find it. Help anyone, must be a simple config that i am not seeing.
PHP Code:
*<?php
require 'E:\Bitnami\apps\phpmyadmin\htdocs\vendor\autoload.php';
$params = array(
'credentials' => array(
'key' => 'XXXX',
'secret' => 'XXXX',
),
'region' => 'us-east-1', // < your aws from SNS Topic region
'version' => 'latest'
);
$sns = new \Aws\Sns\SnsClient($params);*
Regards,
Ochen
E:\Bitnami\apps\phpmyadmin\htdocs
directory? – Chris Williams