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

_camilo_'s avatar

Guzzle - cURL error 60 (SSL) but only in console

Hello there, I'm sending a request with Guzzle to an API and it works. The problem is: the very same request, done from an artisan command, does not work. The error, classic:

cURL error 60: SSL certificate problem: unable to get local issuer certificate for https://api. . . . .

So,

  • Everything is alright in my php.ini;
  • I'm already using the cacert.pem file;
  • I'm using Wamp;
  • The request does not work only runned with artisan.

What could be the difference in running it in the console to get this error?

0 likes
4 replies
Nakov's avatar

What does it mean that everything is alright with your php.ini?

You changed this line curl.cainfo to point to the cacert.pem file? How do you know you are using it when obviously there is an error?

Did you restarted the WampServer when you made those changes?

_camilo_'s avatar

@Nakov Thank you for the reply.

I assume that everything is ok with the php.ini because first I ran into that error but with the request from a controller. Then, I set up the cacert.pem file and the curl.cainfo and openssl.cafile with the path. That way, it worked. But when I did the same request from a file from App\Console\Commands, with artisan, the error appeared again.

Nakov's avatar
Nakov
Best Answer
Level 73

@camilo okay, but then it depends from which terminal you are trying to run the command. Because the php installed within your WAMP is different to the one you have installed on your computer. So you might need to do a check if you've edited the correct php.ini file. So in your console you can run php --ini it will give you Loaded Configuration File and that's the path for the ini that is missing the certificate.

_camilo_'s avatar

@Nakov That was it, thanks. FIrst I had manually searched for the "C:\wamp64\bin\php\php7.4.26\php.ini" to make the changes, but using the Wamp menu and accessing PHP > php.ini I ended up in another file: "C:\wamp64\bin\apache\apache2.4.51\bin\php.ini".

Please or to participate in this conversation.