The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once



UserSpice
Google Sign in problem on virtual server - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: Google Sign in problem on virtual server (/showthread.php?tid=573)



Google Sign in problem on virtual server - giovanni@bisanti.net - 05-24-2017

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



Google Sign in problem on virtual server - mudmin - 05-25-2017

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


Google Sign in problem on virtual server - giovanni@bisanti.net - 05-25-2017

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