0

I'm trying to get S3 set up with my Laravel app (which is running on my local machine) but I'm getting the following error when trying to upload an image.

$my_file = 'file.txt';
$handle = fopen($my_file, 'w') or die('Cannot open file:  '.$my_file);
$data = 'Test data to see if this works!';
fwrite($handle, $data);

$storagePath = Storage::disk('s3')->put("uploads", $my_file, 'public');

This is the error I'm getting:

Error executing "PutObject" on "https://landlord-files.s3.eu-west-2.amazonaws.com/uploads"; 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)
  • Maybe this will help you : https://stackoverflow.com/questions/42094842/curl-error-60-ssl-certificate-in-laravel-5-4 – Md.Sukel Ali Jan 09 '19 at 16:14
  • @Md.SukelAli Thanks very much for the effort. I thought that would be the solution to my problems but I did it and restarted my server and I'm still getting exactly the issue. I don't suppose you can think of anything else at all? I really have no idea what it could be. – Charl van Staden Jan 09 '19 at 19:20
  • 1
    @Md.SukelAli I figured it out. For some reason WAMP is referencing the php.ini file in my apache directory rather than the php folder – Charl van Staden Jan 09 '19 at 20:11

0 Answers0