I had a similar issue while working with Microsoft's Graph product last week. I searched for a big chunk of a full day and I found that I needed to add some certs to my web server and the resolution section title MAMP working solution had enough details for me to solve my problem. I hope that this helps.
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.
@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.
Please or to participate in this conversation.