Rg14 Rg14 - 1 year ago 90
PHP Question

SSL Error and Google_IO_Exception in just 1 program

So I have a script that was a cronjob and worked for 7 months already. It uploads a 300ish MB file, and has never failed until a week ago. The error that pops out is:

Uncaught exception 'Google_IO_Exception' with message 'error:1409442E:SSL rou$
Stack trace:
#0 /libs/src/Google/IO/Abstract.php(136): Google_IO_Curl->executeRequest(Object(Google_Http_Request))
#1 /libs/src/Google/Auth/OAuth2.php(342): Google_IO_Abstract->makeRequest(Object(Google_Http_Request))
#2 /libs/src/Google/Auth/OAuth2.php(278): Google_Auth_OAuth2->refreshTokenRequest(Array)
#3 /root/scriptEnCrontab/libs/src/Google/Client.php(457): Google_Auth_OAuth2->refreshToken('TOKEN...')
#4 /root/scriptEnCrontab/respaldoDrive.php(61): Google_Client->refreshToken('TOKEN...')
#5 {main}
thrown in /root/scriptEnCrontab/libs/src/Google/IO/Curl.php on line 115

I can't seem to find information about that SSL Error or how to solve it. I don't think is the token the problem or the script as it has been working for a long time already. Is it the server? Other scripts that I have still work and using the same auth and credentials that this script uses. Any help is appreciated.

Answer Source

I solved it. Apparently it was a problem with the SSLVERSION in the Curl.php. I haven't updated my api library from google on a while so that might have been solved in another iteration. Here's the line I changed

ORIGINAL: curl_setopt($curl, CURLOPT_SSLVERSION, 3);

CHANGED: curl_setopt($curl, CURLOPT_SSLVERSION, 1);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download