Welcome Guest, Not a member yet? Register   Sign In
trying to use Composer
#4

(This post was last modified: 08-05-2018, 11:54 PM by richb201.)

Thanks. I did that now. I am still getting error below. I removed the third_party\vendor\aws\s3 directory but with little effect. I also set
$config['composer_autoload'] = TRUE; in config.php


( ! ) Fatal error: Class 'S3Client' not found in C:\xampp\htdocs\sub_crud\application\controllers\Configure.php on line 1145
Call Stack
# Time Memory Function Location
1 0.2160 152800 {main}( ) ...\index.php:0
2 0.2500 199312 require_once( 'C:\xampp\htdocs\sub_crud\system\core\CodeIgniter.php' ) ...\index.php:316
3 0.2820 1175432 Configure->__construct( ) ...\CodeIgniter.php:518
4 0.3280 3588080 Configure->_init( ) ...\Configure.php:21
5 0.3290 3589096 Configure->test( ) ...\Configure.php:38
A PHP Error was encountered
Severity: Error

Message: Class 'S3Client' not found

Filename: controllers/Configure.php

Line Number: 1145

Here is the code I am trying to run:
Code:
 public  function test(){
       //Create a S3Client
       $s3Client = new S3Client([
           'profile' => 'default',
           'region' => 'us-east-1',
           'version' => 'latest'
       ]);

//Listing all S3 Bucket
       $buckets = $s3Client->listBuckets();
       foreach ($buckets['Buckets'] as $bucket){
           echo $bucket['Name']."\n";
       }
   }
The instructs for autoload that you sent me says to :
The following items can be loaded automatically:
  • Classes found in the libraries/ directory

  • Helper files found in the helpers/ directory

  • Custom config files found in the config/ directory

  • Language files found in the system/language/ directory

  • Models found in the models/ folder
But I don't recall being asked by Composer where to put the Classes!!! I have no idea where they went.
proof that an old dog can learn new tricks
Reply


Messages In This Thread
trying to use Composer - by richb201 - 08-04-2018, 07:01 PM
RE: trying to use Composer - by richb201 - 08-05-2018, 12:56 PM
RE: trying to use Composer - by ciadmin - 08-05-2018, 08:54 PM
RE: trying to use Composer - by richb201 - 08-05-2018, 11:31 PM
RE: trying to use Composer - by InsiteFX - 08-06-2018, 03:22 AM
RE: trying to use Composer - by richb201 - 08-06-2018, 03:18 PM
RE: trying to use Composer - by richb201 - 08-07-2018, 03:09 PM
RE: trying to use Composer - by InsiteFX - 08-07-2018, 03:25 PM
RE: trying to use Composer - by richb201 - 08-07-2018, 03:55 PM
RE: trying to use Composer - by richb201 - 08-07-2018, 04:35 PM



Theme © iAndrew 2016 - Forum software by © MyBB