This forum is archived. Posts are preserved for historical reference. For current help, join us on Discord.

Google Sign in problem on virtual server

In UserSpice 4.3 and Below · Started by giovanni@bisanti.net on 2017-05-24 7:24 pm · 6802 views · 2 replies

Hi
I'm testing userspice and on a fresh install, I setup google sign in and after I click on "Allow" on the google auth page I get this:

Fatal error: Uncaught Google_IOException: HTTP Error: (0) error setting certificate verify locations: CAfile: /home/xxxxxxxxxxxxxxx/domains/xxxxxxxxxxx/ssl.cert CApath: /etc/ssl/certs in /home/sendtext/public_html/users/src/Google/io/Google_CurlIO.php:128 Stack trace: #0 /home/sendtext/public_html/users/src/Google/auth/Google_OAuth2.php(100): Google_CurlIO->makeRequest(Object(Google_HttpRequest)) #1 /home/sendtext/public_html/users/src/Google/Google_Client.php(131): Google_OAuth2->authenticate(Array, '4/2zAkOTRQ9z4ex...') #2 /home/sendtext/public_html/users/includes/google_oauth.php(29): Google_Client->authenticate() #3 /home/sendtext/public_html/users/includes/header.php(75): require_once('/home/sendtext/...') #4 /home/sendtext/public_html/users/oauth_success.php(23): require_once('/home/sendtext/...') #5 {main} thrown in /home/sendtext/public_html/users/src/Google/io/Google_CurlIO.php on line 128

It looks like it's looking for the cert in the wrong place. The right place would be /home/sendtext/ssl.cert

Any idea?

I'm running
Ubuntu 16.04
Apache 2.4.18
PHP 7.0
everything configured via virtualmin
Hmm. I run all my stuff on VPS, so I don't think it's the fact that it's virtualized. I'm thinking it is one of those URLs you setup during the oauth process is wrong. They can be a bit tricky and pretty much trial and error with different server configs.

There is a cert file location in PHP.ini that could be set wrong. See this answer...
https://stackoverflow.com/questions/30240840/laravel-5-socialite-curl-error-77-error-setting-certificate-verify-locations
Thank you for taking the time to look into this.

I meant Apache Virtual Server (many websites hosted on the same Apache instance).

So Virtualmin allows to have a separate php.ini for each virtual domain. So all I had to do was edit /home/<DOMAIN>/etc/php7.0/php.ini and change the curl.cainfo variable to point to the right ssl.cert

Thanks again. Now I have problems with the reCaptcha... but that is another post