Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

696
Visualizações
Laravel + AWS S3: cURL error 60

I am attempting to create a web page through Laravel that can upload files (starting with images, though looking to upgrade to .doc/.pdf at some point) to an AWS S3 bucket. I've followed the following tutorial in regards to having a simple page to build on:

http://itsolutionstuff.com/post/laravel-5-amazon-s3-file-upload-tutorial-part-1example.html

Unfortunately, I'm currently facing the following error:

S3Exception in WrappedHttpHandler.php line 192:

Error executing "ListObjects" on "https://s3-us-west-2.amazonaws.com/..."; 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)

I've already downloaded the cacert.pem file from https://curl.haxx.se/ca/cacert.pem and have inserted it into php.ini, and I'm still facing this error. For extra thoroughness, I added it into the php.ini-production and php.ini-development files as well, but nothing's changed. What am I still doing wrong?

(I'll add that I'm currently working on a Windows 10 laptop and have downloaded XAMPP, though I'm still using "php artisan serve" to set the local server. I'm unsure if this is a problem or not.)

about 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

I had the same problem. Error reason is you are working on local or on a not verified server. Just you need to add the following line to "filesystem.php"

'scheme' => 'http' // to disable SSL verification on local development

Your filesystem.php should look like this :

's3' => [
            'driver' => 's3',
            'key' => env('AWS_ACCESS_KEY_ID'),
            'secret' => env('AWS_SECRET_ACCESS_KEY'),
            'region' => env('AWS_DEFAULT_REGION'),
            'bucket' => env('AWS_BUCKET'),
            'url' => env('AWS_URL'),
            'scheme' => 'http' // to disable SSL verification on local development
        ],

When you run it on your server which has SSL verification, you need to comment 'scheme' line.

That's it all. Enjoy your coding !

about 4 years ago · Santiago Trujillo Relatório

0

Have you followed everything in this question https://stackoverflow.com/a/38667282/3429655 ?

also one thing that might help is to add a parameter to not verify the SSL in your curl call for the S3 as this is your local environment this might be okay on your hosted dev environment since most hosting companies sort out their SSL cert.pem file etc.

Set CURLOPT_SSL_VERIFYPEER to false in order to disable the CA check.

// connect via SSL, but don't check cert
$handle=curl_init('https://s3-us-west-2.amazonaws.com/');
curl_setopt($handle, CURLOPT_VERBOSE, true);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
$content = curl_exec($handle);

echo $content; // show target page
about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda