Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

laracasts9924's avatar

AWS HTTP error: cURL error 60: SSL certificate problem

Typical cURL issue all around Google Searches. I have tried downloading the new certificate and placing it in many different folders (such as php\php7.2.1\extras\ssl) and creating my path to it in the php.ini file.

[curl] ; A default value for the CURLOPT_CAINFO option. This is required to be an ; absolute path. curl.cainfo ="C:\MAMP\bin\php\php7.2.1\extras\ssl\cacert.pem"

I am using Windows 10, MAMP and PHP 7.2.1.

I am using the league/flysytem aws s3 library for Laravel. I am using Digital Oceans Spaces which you can use this library by adding the Spaces endpoint.

I am also using Cloudways as my hosting so I pushed my my code on the dev site on Cloudways and I am getting the same error.

I have spent hours trying different things without any success. I have searched the Internet and have tried almost every solution that has worked for other people.

Any suggestions? Greatly appreciate any help.

0 likes
12 replies
laracasts9924's avatar

Thanks Dalma. I tried your post. Pretty similar to all the other ones. I went ahead with it as I thought maybe I was downloading the wrong thing. But that link takes you to the page with past and presents certs. https://curl.haxx.se/docs/caextract.html I placed it in C:\MAMP\bin\php\php7.2.1\extras\ssl\cacert.pem and added to php.ini file in the correct php version folder: curl.cainfo ="C:\MAMP\bin\php\php7.2.1\extras\ssl\cacert.pem"

reboot MAMP server and same thing.

anyone else ran into this issue using Windows 10, and MAMP running PHP 7.2.1. In MAMP 4.1 looks like the following versions are running:

OpenSSL 1.0.1g curl 7.36.0

Thanks!

Dalma's avatar

I run WAMP rather than MAMP and there are two different php.ini files to update. Does MAMP also have this issue?

laracasts9924's avatar

Dalma,

yes, so in MAMP, there are 2 php.ini files. I tried both, and then each one individually. but no luck on all 3 tries :( here are the file paths to both php.ini files :

MAMP\bin\php\php7.2.1\

MAMP\conf\php7.2.1\

laracasts9924's avatar

anyone else has any possible solutions dealing with the cURL SSL issue?

Dalma's avatar

I'm sorry but I ran out of ideas.

laracasts9924's avatar
laracasts9924
OP
Best Answer
Level 5

@dalma So I finally figured it out. I am using Mamp for Windows 10. So I downloaded the newest CA cert from here: https://curl.haxx.se/docs/caextract.html

Then since MAMP php.ini has the bare minimum setup, I had to add the openssl lines and point the files to my new certificate.

I placed the new certificate in this path: C:\MAMP\bin\php\php7.2.1\extras\ssl\cacert.pem

A lot of the documentation out there states to use this code snippet:

[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
curl.cainfo ="C:\MAMP\bin\php\php7.2.1\extras\ssl\cacert.pem"

but this NEVER worked for me.

After added this code snippet to my version's php.ini file

[openssl]
; The location of a Certificate Authority (CA) file on the local filesystem
; to use when verifying the identity of SSL/TLS peers. Most users should
; not specify a value for this directive as PHP will attempt to use the
; OS-managed cert stores in its absence. If specified, this value may still
; be overridden on a per-stream basis via the "cafile" SSL stream context
; option.
openssl.cafile="C:\MAMP\bin\php\php7.2.1\extras\ssl\cacert.pem"

; If openssl.cafile is not specified or if the CA file is not found, the
; directory pointed to by openssl.capath is searched for a suitable
; certificate. This value must be a correctly hashed certificate directory.
; Most users should not specify a value for this directive as PHP will
; attempt to use the OS-managed cert stores in its absence. If specified,
; this value may still be overridden on a per-stream basis via the "capath"
; SSL stream context option.
openssl.capath="C:\MAMP\bin\php\php7.2.1\extras\ssl\cacert.pem"

and enable module by un-commenting out this line

extension=openssl

It now works from my local. My files are getting pushed over to DO Spaces.

Now I get to fight my production site on Cloudways.

6 likes
Jonjie's avatar

@dxladner You saved the day bro :) Thanks a lot.

Note: I'm also using windows 10, but with WAMP

1 like
mjch23's avatar

Great! Thanks a lot, you saved my life DXLADNER! I'm using PHP 7 4 1, Windows and MAMP

1 like
adelynx's avatar

You just need to add this to your s3 disk config :

'http'  => [
                'verify' => false, // Disable SSL certificate verification
            ],

PS: you can create env variable for it of course

Please or to participate in this conversation.