CURL Issue while doing a resumable upload

I have a script that uses the resumable upload prototype in the PHP Drive API, and it had been working for 3 or 4 months since I implemented it. On Saturday 17, the script stopped working, and the crontab didn’t run the script due to having this problem:

[17-Oct-2015 05:15:07 America/Chicago] PHP Fatal error:  Uncaught exception 'Google_IO_Exception' with message 'HTTP Error: Unable to connect: 'fopen(): SSL: Broken pipe'' in /root/scriptEnCrontab/libs/src/Google/IO/Stream.php:141
Stack trace:
#0 /root/scriptEnCrontab/libs/src/Google/IO/Abstract.php(136): Google_IO_Stream->executeRequest(Object(Google_Http_Request))
#1 /root/scriptEnCrontab/libs/src/Google/Http/MediaFileUpload.php(164): Google_IO_Abstract->makeRequest(Object(Google_Http_Request))
#2 /root/scriptEnCrontab/respaldoDrive_cgi.php(183): Google_Http_MediaFileUpload->nextChunk('\x8EGu\xA9Y\xE9\xEEQ\x9B\xE1\xAD\x98Xw\xEB...')
#3 /root/scriptEnCrontab/respaldoDrive_cgi.php(96): insertFile(Object(Google_Client), Object(Google_Service_Drive), '/root/respaldo/...', 'RespaldoScripts...', '0B2Xiur2QhdC6fk...')
#4 {main}
  thrown in /root/scriptEnCrontab/libs/src/Google/IO/Stream.php on line 141

After few tweaks, upgrades and installing cURL, the problem changed to either

[20-Oct-2015 18:57:21 America/Chicago] PHP Fatal error:  Uncaught exception 'Google_IO_Exception' with message 'Couldn't resolve host 'www.googleapis.com'' in /root/scriptEnCrontab/libs/src/Google/IO/Curl.php:115
Stack trace:
#0 /root/scriptEnCrontab/libs/src/Google/IO/Abstract.php(136): Google_IO_Curl->executeRequest(Object(Google_Http_Request))
#1 /root/scriptEnCrontab/libs/src/Google/Http/MediaFileUpload.php(164): Google_IO_Abstract->makeRequest(Object(Google_Http_Request))
#2 /root/scriptEnCrontab/respaldoDrive_cgi.php(186): Google_Http_MediaFileUpload->nextChunk('C\x9D\t\xD9\x95\x1F\xAF\xF5!qJ\xCAq\x8CB...')
#3 /root/scriptEnCrontab/respaldoDrive_cgi.php(101): insertFile(Object(Google_Client), Object(Google_Service_Drive), '/root/respaldo/...', 'PaginasWeb.tgz', '0B2Xiur2QhdC6fk...')
#4 {main}
  thrown in /root/scriptEnCrontab/libs/src/Google/IO/Curl.php on line 115

or

[26-Oct-2015 11:36:24 America/Chicago] PHP Fatal error:  Uncaught exception 'Google_IO_Exception' with message 'Operation timed out after 100000 milliseconds with 0 bytes received' in /root/scriptEnCrontab/libs/src/Google/IO/Curl.php:115
Stack trace:
#0 /root/scriptEnCrontab/libs/src/Google/IO/Abstract.php(136): Google_IO_Curl->executeRequest(Object(Google_Http_Request))
#1 /root/scriptEnCrontab/libs/src/Google/Http/MediaFileUpload.php(164): Google_IO_Abstract->makeRequest(Object(Google_Http_Request))
#2 /root/scriptEnCrontab/respaldoDrive_cgi.php(187): Google_Http_MediaFileUpload->nextChunk('S\x98\x85\xC7\xFE\x0E\x8E8\xEE\xE9\n\xF9\x86{\x19...')
#3 /root/scriptEnCrontab/respaldoDrive_cgi.php(99): insertFile(Object(Google_Client), Object(Google_Service_Drive), '/root/respaldo/...', 'RespaldoScripts...', '0B2Xiur2QhdC6fk...')
#4 {main}
  thrown in /root/scriptEnCrontab/libs/src/Google/IO/Curl.php on line 115

I can’t seem to make any of this to work with either version 1.1.6, 1.1.5 or 1.1.4, even though it had been working with the 1.1.4 version without cURL installed.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s