1

I just installed Firebase on Laravel. But when I try to do any operation I get the message: cURL error 60: SSL certificate problem: unable to get local certificate issuer (see http://curl.haxx.se/libcurl/c/libcurl-errors.html ). I followed the procedure described here and here but the problem does not disappear. And for the installation of Firebase on Laravel, I followed the procedure of this tutorial and this document. So even by downloading the last cacert.pem and modifying the line ;curl.cainfo by curl.cainfo = "C: \ wamp64 \ bin \ php \ php7.2.10 \ cacert.pem" and restarting the server, it does not change anything, the problem persists. Can someone help me? I am really starting to despair.

Alpha Col
  • 65
  • 10

2 Answers2

4

You need to download the CA bundle from here: https://curl.haxx.se/docs/caextract.html

Once downloaded, save it to your C:\wamp64\ directory, and then add the following lines to the bottom of your php.ini file:

url.cainfo="C:/wamp64/cacert-2019-01-23.pem"
openssl.cafile="C:/wamp64/cacert-2019-01-23.pem"

Finally, restart WAMP.

In addition to this, you can set the following cURL options (in case the above does not work due to a self-signed or bad SSL certificate):

curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, 0);
Zishan Neno
  • 2,647
  • 7
  • 34
  • 58
1

If you are serving your application with "PHP artisan serve" command, it means you are using PHP built-in webserver which means all your .ini file configurations will not affect your application. Use Wamp or Lamp to serve your Laravel application if you are in a local environment and follow Zishan Danish Neno's answer.