Solving Amazon S3 cURL Error when uploading an Object

Lately, I’ve been working on Amazon S3 API, wherein I’m uploading videos/object in the Amazon Server, however, I was really stuck on an error every time i’m uploading files into the Amazon. Here’s the error below:
Fatal error: Uncaught exception 'RequestCore_Exception' with message 'cURL resource: Resource id #16; cURL error: select/poll returned error (55)' in /home/user/ 824 Stack trace: #0 /home/user/ RequestCore->send_request() #1 /home/user/ AmazonS3->authenticate('bucket...', Array) #2 /home/user/ AmazonS3->create_object('bucket...', '1te0f0idn4.mp4', Array) #3 {main} thrown in /home/user/ on line 824

Now this is the start of a major headache which I thought I could pass this task quickly! After doing a quick research, I never found an answer, how sad :( , I even asked this at but unfortunately, I never got a correct answer. Anyway, nuf said!

Here’s what I did to combat this bug.

Simple 3 Steps.

  • Make sure to download the Latest Version of Amazon SDK for PHP 
  • After uploading the SDK into your site, point your browser to the location where you uploaded the SDK, then point it where the sdk_compatibility_test.php. Mine was You will see if you’re able to run the Amazon SDK in your site. I assume that you are able to run. Try to check the version of your cURL.
  • Since the error that we encountered was about cURL. Make sure that you have the latest version of  it. Mine is 7.21.0 (OpenSSL/0.9.8o). To update the version of your cURL, try to contact your hosting administrator.

There you go!! That’s how easy to solve that major bug that you’ve been stuck for so long.

So to make the debugging short, make sure you have the latest version of cURL because the lower version of cURL was quite buggy.

There was another solution that I read on how to solve the bug. It was like modifying the and changing the
‘certificate_authority’ => false
‘certificate_authority’ => true
but honestly that didn’t work for me, so I guess all of us have a different situation.

Okay! I hope this helps everyone! Have a Happy Coding!