MacOS 10.11
Dev Desktop Version 2
PHP 5.6
Attempting to load Drupal 8 template page which contains Google Map. Works on production and dev servers, but not locally. Page gives "The website encountered an unexpected error. Please try again later." error when loading locally and back trace shows the following info:
Error:
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 GuzzleHttp\Handler\CurlFactory::createRejection() (line 187 of vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php).
Diagnosis:
array(8) { ["default_cert_file"]=> string(68) "/Users/acquia/csbworkdir/dmitrybezer/libopenssl/install/ssl/cert.pem" ["default_cert_file_env"]=> string(13) "SSL_CERT_FILE" ["default_cert_dir"]=> string(65) "/Users/acquia/csbworkdir/dmitrybezer/libopenssl/install/ssl/certs" ["default_cert_dir_env"]=> string(12) "SSL_CERT_DIR" ["default_private_dir"]=> string(67) "/Users/acquia/csbworkdir/dmitrybezer/libopenssl/install/ssl/private" ["default_default_cert_area"]=> string(59) "/Users/acquia/csbworkdir/dmitrybezer/libopenssl/install/ssl" ["ini_cafile"]=> string(47) "/Applications/DevDesktop/common/cert/cacert.pem" ["ini_capath"]=> string(0) "" }
Backtrace:
GuzzleHttp\Handler\CurlFactory::finishError(Object, Object, Object) (Line: 103)
GuzzleHttp\Handler\CurlFactory::finish(Object, Object, Object) (Line: 43)
GuzzleHttp\Handler\CurlHandler->__invoke(Object, Array) (Line: 28)
GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}(Object, Array) (Line: 51)
GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}(Object, Array) (Line: 37)
GuzzleHttp\PrepareBodyMiddleware->__invoke(Object, Array) (Line: 30)
GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object, Array) (Line: 70)
GuzzleHttp\RedirectMiddleware->__invoke(Object, Array) (Line: 57)
GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object, Array) (Line: 67)
GuzzleHttp\HandlerStack->__invoke(Object, Array) (Line: 277)
GuzzleHttp\Client->transfer(Object, Array) (Line: 125)
GuzzleHttp\Client->requestAsync('get', 'https://maps.googleapis.com/maps/api/geocode/json', Array) (Line: 131)
GuzzleHttp\Client->request('get', 'https://maps.googleapis.com/maps/api/geocode/json', Array) (Line: 89)
GuzzleHttp\Client->__call('get', Array) (Line: 273)
GuzzleHttp\Client->get('https://maps.googleapis.com/maps/api/geocode/json', Array) (Line: 273)
It appears that the "default_cert_file" is being used (and doesn't exist locally) and that the file that does exist "/Applications/DevDesktop/common/cert/cacert.pem" isn't. The default is hard wired from the PHP build in Dev Desktop. I'm not sure if Guzzle doesn't bother trying to find other options from the available list or if I have some other problem.
Is there a way to override the "default_cert_file" from php.ini...?? Or is there a better solution?
I went so far as to create the location that the default_cert_file was looking for just to see if that would solve it, but it did not.