When i move from amazons3 v1 to v2, some of the existing images successfully generated. While some of them will give below error.

Exception: Amazon S3 was unable to create an image style derivative. Check the temporary directory configuration and permissions. in amazons3_image_deliver() (line 139 of /var/www/html/sites/all/modules/contrib/amazons3/amazons3.module).

Checked those images are exists in S3 bucket, after separately running image_get_info, given error below

The selected image handling toolkit gd can not correctly process image_gd_get_info.

My environment is php 5.5 on CENTOS and php5.5 gd is installed

Please advice
Keith

Comments

deviantintegral’s picture

Status: Active » Needs review

(copied from another comment)

Yeah... this turns out to be related to EXIF data dependent on the camera that took the image. It's a combination of a PHP issue and an AWS SDK issue. There's an issue over at Github and a pull request that could use some more testing.

I'm going to open a new issue for the amazons3_presigned_urls bug.

cloudbull’s picture

thanks, will keep searching for soluiton

cloudbull’s picture

Following the issue in github, I tried to update download amazons3-7.x.2.x-dev and update composer.json awssdk to dev-master, and reenable amazons3 module

then dev-master of awssdk can install. but it prompt an error

2015/05/27 06:31:56 [error] 6780#0: *6168 FastCGI sent in stderr: "PHP message: PHP Fatal error: Access to undeclared static property: Drupal\amazons3\StreamWrapper::$cache in /var/www/html/sites/all/modules/contrib/amazons3/src/StreamWrapper.php on line 129" while reading response header from upstream, client: 10.0.2.19, server: ip-10-0-0-194, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm-www.sock:", host: "test1-bangkok.coconuts.co"

Looks like some more update required from awssdk

deviantintegral’s picture

There's a few patches to the SDK that are required for features that they decided to only add to the upcoming V3 release.

If you want to try the code from that PR, you can do a git checkout from github and checkout that branch. Or, you can grab the diff from github (add .diff or .patch to the end of the PR URL like https://github.com/justafish/drupal_amazons3/pull/30.diff) and apply that, followed by drush composer-rebuild and drush composer-manager update.

deviantintegral’s picture

Title: Exception: Amazon S3 was unable to create an image style derivative. Check the temporary directory configuration and permissions. in amazons3_image_deliver() » Fix getimagesize() failing when images require fseek
deviantintegral’s picture

Status: Needs review » Fixed

  • deviantintegral committed f1b5bde on 7.x-2.x
    Issue #2494829: Fix getimagesize() failing when images require fseek
    
larowlan’s picture

doh, fixed this in a client project independently yesteday

cloudbull’s picture

cool !

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.