0

estoy tratando de conectar e iniciar la API de Gmail.
Para ello estoy usando la guía quickstart en PHP
Están listos todos primeros 3 pasos sin problemas, pero al momento de usar php quickstart.php ocurre lo siguiente:

  1. Primero, usando el comando php quickstart.php en la terminal, ejecutamos el quickstart.
  2. Nos envía un link, el cual hacemos ingreso, y permitimos el acceso al correo
  3. Como respuesta, nos entrega un código de verificación que hay que pegar de vuelta en la terminal

Pero al momento de realizar esos pasos, y luego de pegar dicho codigo, salta el siguiente error:
Probablemente, sea algún problema de instalación, pero no se como confirmarlo.

PHP Fatal error:  Uncaught GuzzleHttp\Exception\RequestException: cURL error 60: SSL 
certificate problem: unable to get local issuer certificate 
(see http://curl.haxx.se/libcurl/c/libcurl-errors.html) 
in C:\AppServ\www\gmail\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:187

Stack trace:
#0 C:\AppServ\www\gmail\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(150): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array)
#1 C:\AppServ\www\gmail\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(103): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
#2 C:\AppServ\www\gmail\vendor\guzzlehttp\guzzle\src\Handler\CurlHandler.php(43): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
#3 C:\AppServ\www\gmail\vendor\guzzlehttp\guzzle\src\Handler\Proxy.php(28): GuzzleHt in C:\AppServ\www\gmail\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 187

Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see 
http://curl.haxx.se/libcurl/c/libcurl-errors.html) in C:\AppServ\www\gmail\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:187
Stack trace:
#0 C:\AppServ\www\gmail\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(150): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array)
#1 C:\AppServ\www\gmail\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(103): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
#2 C:\AppServ\www\gmail\vendor\guzzlehttp\guzzle\src\Handler\CurlHandler.php(43): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
#3 C:\AppServ\www\gmail\vendor\guzzlehttp\guzzle\src\Handler\Proxy.php(28): GuzzleHt in C:\AppServ\www\gmail\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 187
3

1 respuesta 1

0

Luego de una búsqueda, lo resolví de la siguiente forma:

  1. Descargar el último cacert.pem desde https://curl.haxx.se/ca/cacert.pem
  2. Agregar a php.ini la siguiente línea, o editarla si ya existe:
    curl.cainfo="/ubicacion del archivo/cacert.pem" (Entre comillas dobles)
  3. Reiniciar Apache, se puede usando STOP y START desde inicio.

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge you have read our privacy policy.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.