0
votes

i'm using the Google APi PHP Client to verfiy Google Play Logins from my Android Application. Out of nowhere the service stopped working and gives me this error.

Fatal error>: Uncaught exception 'GuzzleHttp\Exception\ConnectException' with message 'cURL error 6: Could not resolve host: www.googleapis.com (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)' in /var/www/vhosts/smokah.one/api.smokah.one/csgo/google-api-php-client/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:186 Stack trace: 0 /var/www/vhosts/smokah.one/api.smokah.one/csgo/google-api-php-client/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(150): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array) 1 /var/www/vhosts/smokah.one/api.smokah.one/csgo/google-api-php-client/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 /var/www/vhosts/smokah.one/api.smokah.one/csgo/google-api-php-client/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php(43): GuzzleHttp\Handler\CurlFactory::finish(Object( in /var/www/vhosts/smokah.one/api.smokah.one/csgo/google-api-php-client/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 186

It happend out of nowhere.

Sincerely Elias

1

1 Answers

1
votes

You can try with below option:

  1. Check your ssl certificate, It might not configured proper. You can try once commenting the extension=curl.so line from from your php.ini

  2. Make sure the hosted server should be able to ping to google websites, by pass the google service url if blocked.

  3. Restart the php-fpm service if you made any changes related to server configuration.

In my case 2nd options worked, Every time I need to login to my server remotely and needs to start internet as proxy is there.

Let me know if any of above solutions worked for you.

Thanks!