Friday, March 17, 2017

[SOLVED]AWL SSL error in Laravel : unable to get local issuer certificate

I'm currently setting up amazon s3 on my laravel setup (first time doing anything with AWS), and I've run into a bit of a snag. For reference, I'm using XAMPP v.3.2.2 and PHP 7.0.5. Maybe someone can tell me where I went wrong.
First, I added these to my composer.json file:
"require": {
    "graham-campbell/flysystem": "^3.0",
    "league/flysystem-aws-s3-v3": "^1.0"
},

and ran a composer update.
Next, I added this to my filesystems.php file:
's3' => [
    'driver' => 's3',
    'key'    => 'A--------edited out for stackoverflow-------WA',
    'secret' => 'h-------------edited out for stackoverflow-------------B',
    'region' => 'us-east-1',
    'bucket' => 'commendmeus',
],

and finally I tried doing a test to make sure everything worked. In my routes file I added:
use Illuminate\Support\Facades\Storage;
get('test', function () {
        echo 123;
        $s3 = Storage::disk('s3');
        $s3->put('myfile.txt', 'test file', 'public');
});

Unfortunately, I ran into an error:
S3Exception in WrappedHttpHandler.php line 192: Error executing "ListObjects" on "https://s3.amazonaws.com/commendmeus?prefix=myfile.txt%2F&max-keys=1&encoding-type=url"; AWS HTTP error: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
Here is a screenshot for reference:
enter image description here
I know nothing of SSL, and while I've seen errors similar to mine on stackoverflow, it might as well be like reading chinese to me. Could anyone help me out with what the proper course of action would be?


via Felix Maxime

Advertisement