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

ajiyakin's avatar

If you use guzzle 3.x. You can set ssl verification using setSslVerification method: $guzzle->setSslVerification(false)

1 like
rajiv's avatar

What saved me was disabling the AV, thought should share and hope this helps someone getting error with cert. I tried saving a copy of .pem file and changed my php.ini but that didn't work. I disabled my firewall, alas no effect, and finally I stopped my Anti Virus service and that was it. It worked.

allenrose's avatar

Thanks for all replies around downloading cacert.pem from gitub. It worked for me in Windows 7, wamp64 and Laravel 5.1 with Mailgun. Just wanted to share that I had to add the line - as follow - to C:\wamp64\bin\php\php7.0.0\phpForApache.ini file instead of php.ini file. It should looks like this:

curl.cainfo="C:<full path to your preferred folder>\cacert.pem"

1 like
bobinwood's avatar

You can still use "guzzlehttp/guzzle": "~5.3|~6.0", in your composer.json but you need to edit the following file in vendor/guzzlehttp/guzzle/src/Client.php

        $defaults = [
            'allow_redirects' => RedirectMiddleware::$defaultSettings,
            'http_errors'     => true,
            'decode_content'  => true,
            'verify'          => true, //  TO BE REPLACED by false
            'cookies'         => false
        ];

It can be a security issue, but it worked for me.

23 likes
soWizardly's avatar

@connecteev

"Keep seeing this error: cURL error 77: error setting certificate verify locations: CAfile: "C:\xampp\sendmail\cacert.pem CApath: none (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

I use xampp as well as had this same problem...solution was to enter the CORRECT path...

In my case, I had originally entered "C:\xampp\php\cacert.pem" when it should be "\xampp\php\cacert.pem"

Hope this helps someone!

Desu's avatar

The solutions about are great when you have access to php.ini. I did this more programmatically:

use GuzzleHttp\Client;
// ....
// Workaround
// https://laracasts.com/discuss/channels/general-discussion/curl-error-60-ssl-certificate-problem-unable-to-get-local-issuer-certificate?page=3#reply-166681
$providerInstance = $socialite->driver($provider);
$providerInstance->setHttpClient(
    new Client([
        'curl' => [
            CURLOPT_CAINFO => base_path('resources/assets/cacert.pem')
        ]
    ])
);

$user = $service->createOrGetUser(
    $providerInstance->user()
);
1 like
NYW's avatar

thx soo much @moez you are solved my problem. now i can send email form wampserver on laravel with mailgun ^^ i link the "cacert.pem" in my "php.ini" and now all done !!

giovannipds's avatar

@Desu, I liked your idea, but in my case, I don't know where I should put this codes. Error 60 is happening to me while using Mail Laravel's class. If you know how to adapt that to it, let me know. Regards!

giovannipds's avatar

Following what @layeyr7 suggested, the link updated to https://curl.haxx.se/docs/caextract.html, which will later be resolved to https://curl.haxx.se/ca/cacert.pem.

I've solved using guzzlehttp/guzzle version 6.0, but I believe I could have used the latest version (6.2) as well.

Later on, I've followed what @allenrose mentioned, and put it on Wamp's/PHP php.ini.

SUMMARIZING: If you're also on Windows (and using Wamp64 or similar), do this:

  1. Open https://curl.haxx.se/ca/cacert.pem and save the cacert.pem to a path like "C:\wamp64\extras\cacert.pem" - beware to not allow Windows save it like "cacert.pem.txt";

  2. Open your php.ini, and locate the "curl.cainfo" line, which should be more or less the line 1859. Update it to (whitout the ; in the beginning too):

    curl.cainfo="C:\wamp64\extras\cacert.pem"

  3. Restart the services and voilá.

I would also recommend you to let this kind of instructions on your project if someone gets caught on that, along with letting the cacert.pem in some path like "resources/assets/" as a backup quick shortcut.

Thanks for the post, guys.

7 likes
mglrahul's avatar

Hi Guys,

We can solve this problem by replacing this line in php.in file from curl.cainfo to curl.cainfo ="F:\xampp\php\extras\cacert.pem" and put the pem file in appropriate place.

cheers

1 like
ricardovigatti's avatar

I'm seeing a lot of BAD solutions here, the only right solution was provided by @Sven0188 and he has 33 likes.

@slim12kg really should mark that answer to be featured on first page!

giovannipds's avatar

@ricardovigatti @Sven0188 is right, but is very important to store "cacert.pem" with your project as well, if this happen to another developer, you'd saving him some hours.

1 like
ricardovigatti's avatar

@giovannipds sorry but this was exactly what he said... https://laracasts.com/discuss/channels/general-discussion/curl-error-60-ssl-certificate-problem-unable-to-get-local-issuer-certificate/replies/37017

Sorry for posting being a little anger, but i can't understand why this post continued along with 2 more pages of people asking and answering different bad solutions even after he made a simple and correct answer, with a lot of positive feedbacks...

giovannipds's avatar

Hello @ricardovigatti. Yeah, I saw what he said, and followed it up. He's right. But, I've just commented here because this post seemed confusing at first look. I tried to summarize it above, on my second comment.

@Desu's project solution seems to be good too, but I didn't give it a try. Although, it's not that necessary... What I meant to say about, that "you should store cacert.pem with your project", was not because of @Desu's solution, but because of you would have avoid other developers having the same issue with your project, in the future. It could just be a README.md on your project's root, with @Sven1088 instructions there. Also, with cacert.pem already somewhere (because it's a small file). I've stored mine in the project's path "resources/assets/", just as a backup.

So, are we done with this post? I guess we all have already understand it...

Cheers, Gio.

1 like
zerouter's avatar

@bobinwood 's solution worked for me after I edited the php.ini file with @Sven0188 's instruction and @GeoffGordon 's file link. My guzzle's version is 6.2.1 . But by following @bobinwood 's solution will there be any risk to my users when they want to log in by using Facebook ? Thanks in advance.

harit's avatar

for wamp server, we need to update this php.ini (not from bin/php/php.ini)

(left click ) wampmanager icon -> PHP -> php.ini

duka's avatar

Also

$client = new Client([ 'verify' => false ]);

work on Guzzle 6.0.

2 likes
reynaldilorenzo's avatar

In case if there are some peoples still getting this issue, i have 'funny style' to solve this problem and it is quite simple. After reading laravel Mailer source code, and i found something 'funny' without doing anything with php.ini file.

Try adding 'guzzle' => ['verify' => false] in config/services.php right on your driver, that should overwrite default guzzle config for 'verify' which has default value true.

Of course, you can overwrite guzzle config from here to. Hope this will help

1 like
eithed's avatar

Please bear in mind that if you're using xAMPs that change PHP version (for example AMPPS but WAMP does it as well if I'm not mistaken), there might actually be two files that you've got to edit, depending on the environment you're running from (web calls/cmd calls) - one is within given PHP version directory, the other in the apache folder.

abubakar's avatar

i just use the Following code in my Callback controller $providerUser = \Socialite::driver('facebook') ->setHttpClient(new \GuzzleHttp\Client(['verify' => false])) ->user(); its work like a charm

LuisGC's avatar

I solve my problem installing this "guzzlehttp/guzzle": "~6.0" composer require guzzlehttp/guzzle:~6.0

Please or to participate in this conversation.