cURL错误60:Laravel 5.3中的SSL证书

cURL错误60:Laravel 5.3中的SSL证书

问题描述:

I'm trying to build a social media package socialite version ^2.0 login in Laravel 5.3, where I've configured as per the instruction on github, while getting the callback I'm getting an error:

cURL error 60: SSL certificate problem

Well I tried searching about this problem and whatever it was instructed I did, but still getting the same certificate error.

First of all I'm using wamp server which has PHP version 5.6 and 7 I saved the cacert.pem from the link https://curl.haxx.se/ca/cacert.pem and placed it to C:\wamp\bin\php\php7.0.4\ext and to C:\wamp\bin\php\php5.6.19\ext and edited php.ini file of respective version and added the following at end of the file:

[cURL]
curl.cainfo="C:\wamp\bin\php\php7.0.4\ext\cacert.pem"

and

[cURL]
curl.cainfo="C:\wamp\bin\php\php5.6.19\ext\cacert.pem"

Well this didn't worked so I searched more I came to know that I need to install guzzlehttp/guzzle So I did so, while using the version ^6.0 I was still getting the same then I tried version ^4.0 as it was suggested in many blogs, while doing so I was getting a bindshared error:

  Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined method Illuminate\Foundation\Application::bindShared()

?[37;41mScript php artisan optimize handling the post-update-cmd event returned with an error?[39;49m


?[37;41m                      ?[39;49m
?[37;41m  [RuntimeException]  ?[39;49m
?[37;41m  Error Output:       ?[39;49m
?[37;41m                      ?[39;49m

?[32mupdate [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies][-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [?[39m?[32m<packages>?[39m?[32m]...?[39m

And it resisted the socialite function to execute. While trying the version 5.0 I was getting this error:

cURL error 60: SSL certificate problem: unable to get local issuer certificate

I tried disabling the firewall too, but same thing are displaying. Guide me in this. Currently I'm working on PHP Version 7.0.4

I'll be fully honest, I don't know anything about Laravel. But I had the same problem, so as many other, on Symfony. And so as you I tried many things without success.

Finally, this solution worked for me : URL solution

It indicates that instead of a certificate problem, it could came from a environnement non-compatibility. I used XAMPP instead of WAMP and it worked.