Reputation: 11
I am trying to run this php script
sudo php S3Client.php
however I receive this erreur that I can't find a solution for it
PHP Fatal error: Class 'Aws\Common\Client\AbstractClient' not found in /etc/vendor/aws/aws-sdk-php/src/Aws/S3/S3Client.php on line 121
and this the Script of S3client.php
namespace Aws\S3;
use Aws\Common\Client\AbstractClient;
use Aws\Common\Client\ClientBuilder;
use Aws\Common\Client\ExpiredCredentialsChecker;
use Aws\Common\Client\UploadBodyListener;
use Aws\Common\Enum\ClientOptions as Options;
use Aws\Common\Exception\RuntimeException;
use Aws\Common\Exception\InvalidArgumentException;
use Aws\Common\Signature\SignatureV4;
use Aws\Common\Model\MultipartUpload\AbstractTransfer;
use Aws\S3\Exception\AccessDeniedException;
use Aws\S3\Exception\Parser\S3ExceptionParser;
use Aws\S3\Exception\S3Exception;
use Aws\S3\Model\ClearBucket;
use Aws\S3\Model\MultipartUpload\AbstractTransfer as AbstractMulti;
use Aws\S3\Model\MultipartUpload\UploadBuilder;
use Aws\S3\Sync\DownloadSyncBuilder;
use Aws\S3\Sync\UploadSyncBuilder;
use Guzzle\Common\Collection;
use Guzzle\Http\EntityBody;
use Guzzle\Http\Message\RequestInterface;
use Guzzle\Iterator\FilterIterator;
use Guzzle\Plugin\Backoff\BackoffPlugin;
use Guzzle\Plugin\Backoff\CurlBackoffStrategy;
use Guzzle\Plugin\Backoff\ExponentialBackoffStrategy;
use Guzzle\Plugin\Backoff\HttpBackoffStrategy;
use Guzzle\Plugin\Backoff\TruncatedBackoffStrategy;
use Guzzle\Service\Command\CommandInterface;
use Guzzle\Service\Command\Factory\AliasFactory;
use Guzzle\Service\Command\Factory\CompositeFactory;
use Guzzle\Service\Resource\Model;
use Guzzle\Service\Resource\ResourceIteratorInterface;
this is the first time that I work with PHP code and s3 so for that I am blocked appreciate any help
Upvotes: 0
Views: 576
Reputation: 1153
What the error means that Class "Aws\Common\Client\AbstractClient" cannot be found in your file.
This might be because you have not included the correct file or the file you are referring to doesn't exist.
Did you add the autoloader above the class?
require 'vendor/autoload.php';
See the documentation for aws -> https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/getting-started_basic-usage.html
Upvotes: 0