Non WP site throwing cURL 77 Error

What issue or error are you experiencing?

I am running on a non-WP version of Local (all WP files deleted) and am using the AWS SDK for connecting to DO spaces and when I try to get an object I encounter the following error (message modified for security):

"Error executing "GetObject" on ""; AWS HTTP error: cURL error 77: error setting certificate verify locations:  CAfile: /Users/username/directory/app/public/wp-includes/certificates/ca-bundle.crt CApath: none (see for"

As you can see, the system is looking for a ca-bundle.crt file that doesn’t exist since this Local site doesn’t have WP installed.

If I manually add the file, voila. Everything starts working as expected. I shouldn’t have to add this manually to any non-WP site that is making cURL requests.

This has been working perfectly fine for ages so I’m not sure what could be causing it all of a sudden. Is there some system setting in Local that tells cURL in the shell where to find the ca-bundle.cert file?

What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

  1. Delete all WP files in the public directory.
  2. Make a cURL request using the AWS S3 SDK.

System Details

  • Local Version: 8.0.0

  • Operating System (OS) and OS version: Mac OS X Ventura 13.4.1

Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)

Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi @benjamin

Was this working before you updated to v8.0?

If you downgrade to 7.2 does it work again?

No, it was not working before. I upgraded to 8.0.0 to see if that would fix it but it made no difference.

Oh okay, I was just wondering since you said, “This has been working perfectly fine for ages so I’m not sure what could be causing it all of a sudden.”

What version were you on when it was “working fine”?

It was working great on 7.2 as far as I know, and all the previous versions. This error is new to me. Googling it I see others saying it’s an issue with cURL (see: AWS HTTP error: cURL error 77: error setting certificate verify locations · Issue #1416 · aws/aws-sdk-php · GitHub).

I haven’t done any updates recently (that I know of) although I know that cURL had a huge vulnerability recently and it makes me wonder if it’s connected (see: Vulnerabilities in curl patched after week-long tease • The Register)

With that being said, the issue I was hoping to fix is why it’s looking for the bundle file inside app/public/wp-includes/certificates. I’ve got not references to that anywhere in my code and the only thing I can think is some kind of setting in the Local system/setup.

After digging deeper, it looks like it’s coming from the php.ini.hbs file:


Strange that I never got this before as it’s been working for years, but I’ll just make the change here and that should be all I need.

1 Like

Nice! Thanks for coming back and sharing the fix in case others run into the same issue. Happy Developing @benjamin!