title: Amazon S3 PHP image save curl error
body: <p>I am trying to save an image to amazon's S3 cloud service using the s3 sdk provided by amazon.  The code is actually very straight forward, this is the call in my code:</p>
  
  <pre><code>include_once "s3/sdk.class.php";
  
  $s3 = new AmazonS3();
  $file = $_FILES['userfile']['tmp_name'];
  $name = $netid . "_splash.png";         
  $bucket = 'gw_splash';          
  
  $response = $s3-&gt;create_object($bucket, $name, array(
  'fileUpload' =&gt; $file));
  </code></pre>
  
  <p>However, I do not think this call is the problem.  When I run the code on a local WAMP server everything works fine.  It is when I move it to the remote web server, running php5.2 and centOS 5.5 that I run into problems.  I end up seeing this error in the logs:</p>
  
  <pre><code>[Thu Mar 24 11:38:57 2011] [error] [client 204.11.231.186] PHP Fatal error:  Uncaught exception 'RequestCore_Exception' with message 'cURL resource: Resource id #61; 
  cURL error: select/poll returned error (55)' in /var/www/admin/system/application/controllers/s3/lib/requestcore/requestcore.class.php:795\nStack trace:\n#0 /var/www/admin/system/application/controllers/s3/services/s3.class.php(703):
  RequestCore-&gt;send_request()\n#1 /var/www/admin/system/application/controllers/s3/services/s3.class.php(1196): 
  AmazonS3-&gt;authenticate('gw_splash', Array)\n#2 /var/www/admin/system/application/controllers/appdetails.php(224): AmazonS3-&gt;create_object('gw_splash', '22182_splash.pn...', Array)\n#3 [internal function]: 
  Appdetails-&gt;do_upload()\n#4 /var/www/admin/system/codeigniter/CodeIgniter.php(236): call_user_func_array(Array, Array)\n#5 /var/www/admin/index.php(115): 
  require_once('/var/www/admin/...')\n#6 {main}\n  thrown in /var/www/admin/system/application/controllers/s3/lib/requestcore/requestcore.class.php on line 795, referer:
  http://admin.isites.us/appdetails/?netid=22182&amp;appType=1&amp;appId=62981
  </code></pre>
  
  <p>Google tells me that error(55) is a network error.  I know curl works fine as I have other php projects running that use curl just fine.  I think that if I had php-curl.so in my extensions directory everything would work, (Besides the warning that it was loaded twice) but php-common comes with it already packaged together.  </p>
  
  <p>I really at a loss of what else to try since it DOES work locally, just not on the linux machine.  I've been trying to go through the sdk provided by amazon to see if its trying to invoke php-curl in some weird way, but I haven't had any luck as of yet.</p>
  
  <p>Any ideas would be greatly appreciated!</p>