Dolibarr: 3.9.0-beta Printing error

Hello Fred,

Am using windows. Please help me

@Fred,

I am using windows i have copied the code from github and now i don’t have errors but now no token after giving authorisation.

@Frederick,

I am using windows i have copied the code from github and now i don’t have errors but now no token after giving authorisation.

Hello
Try to edit google_oauthcallback.php about line 130 Ă  140

    $backtourl = $_SESSION["backtourlsavedbeforeoauthjump"];
    unset($_SESSION["backtourlsavedbeforeoauthjump"]);
    print '<pre>'.print_r($apiService, true).'</pre>';
    print '<pre>'.print_r($token, true).'</pre>';
    //header('Location: ' . $backtourl);
    exit();
}
else // If entry on page with no parameter, we arrive here
{
    $_SESSION["backtourlsavedbeforeoauthjump"]=$backtourl;

Do you have curl error?
Do not post full result, it may contain private data.

Fred

@frederic34,

I get this error. And the line i had to replace was not 130 this time around. Since i have copied the code from github the line to replace was line 105.

Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in C:\dolibarr\www\dolibarr\htdocs\includes\OAuth\Common\Http\Client\CurlClient.php on line 107
cURL Error # 60: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:confused:SL routines:confused:SL3_GET_SERVER_CERTIFICATE:certificate verify failed

OAuth\OAuth2\Service\Google Object

Hello
Same problem with curl and ssl certificate not updated in windows wamp:

Download the file cacert.pem here:
http://curl.haxx.se/ca/cacert.pem (file is often updated)
put it in the directory where php is installed
modify le php.ini and add (or update)
curl.cainfo=c:\php\cacert.pem (take care of the directory name)

maybe you can have two php.ini
and restart server

Fred

@frederick24,

this is actually where am having a problem. Where is the php installed please can you refer and where can i see the php.ini file. Since you have more experience with this please refer me to save time.

Hello
There are several pages on how to do that like:
https://docs.bolt.cm/release-2-2/howto/curl-ca-certificates

Fred