title: AWS SDK for PHP, uploading an image returns 500 internal server error
body: <p>I'm attempting to upload an image with AWS PHP SDK. For some odd reason some images aren't uploading?</p>
  
  <pre><code>$s3 = new Aws\S3\S3Client([
              'region'  =&gt; 'us-east-1',
              'version' =&gt; 'latest',
              'endpoint' =&gt; 'https://example.com',
              'use_path_style_endpoint' =&gt; true,
              'credentials' =&gt; [
                  'key'    =&gt; $access_key,
                  'secret' =&gt; $secret,
              ]
          ]);     
  
  
          try {
  
              $result = $s3-&gt;putObject([
                  'Bucket' =&gt; $bucket,
                  'Key'    =&gt; $file_name,
                  'Body' =&gt; fopen($file_location, 'r'),
                  'ContentType' =&gt; $imageType,
                  'ACL'   =&gt; 'public-read'    
              ]);
  
          } catch(Aws\S3\Exception\S3Exception $e) {
  
              echo $e-&gt;getMessage();
          }
  </code></pre>
  
  <p>I can download an image from dummyimage.com and it will upload to a bucket successfully but when i attempt other images s3 returns a 500 internal server error.</p>
  
  <p>How do i solve?  There is nothing in the error logs.</p>