Amazon S3 Image upload failed

59 views
Skip to first unread message

Dave Sinclair

unread,
Aug 11, 2012, 7:55:01 AM8/11/12
to hppga...@googlegroups.com
Hi

I've just been attempting to setup S3 and I can't upload an photos. When I try it just says 'failed'

I followed the Amazon S3 activation instructions, and have created a bucket. Are there any further S3 setup requirements? In amazon s3 manager do I need to change any settings?

Thanks in advance for any help..

ps
The default.log error looks like this:

Aug 11 12:40:41 [Warning] [default] [default] Exception during uploadexception 'ezcImageFileNotProcessableException' with message 'File 'var/tmpupload/normal_mfgcm1344685241Screen-shot-2012-08-03-at-12-42-17.png' could not be processed. The temporary file /tmp/.normal_mfgcm1344685241Screen-shot-2012-08-03-at-12-42-17.pngDzqRA7 could not be renamed to var/tmpupload/normal_mfgcm1344685241Screen-shot-2012-08-03-at-12-42-17.png.' in /var/www/html/g1/ezcomponents/ImageConversion/src/transformation.php:339
Stack trace:
#0 /var/www/html/g1/ezcomponents/ImageConversion/src/converter.php(324): ezcImageTransformation->transform('var/tmpfiles/ca...', 'var/tmpupload/n...')
#1 /var/www/html/g1/lib/core/lhgallery/lhimageconverter.php(305): ezcImageConverter->transform('thumbbig', 'var/tmpfiles/ca...', 'var/tmpupload/n...')
#2 [internal function]: erLhcoreClassImageConverter::handleUpload(Object(erLhcoreClassModelGalleryImage), Array)
#3 /var/www/html/g1/lib/models/lhgallery/erlhcoreclassmodelfiletype.php(140): call_user_func_array('erLhcoreClassIm...', Array)
#4 /var/www/html/g1/modules/lhgallery/upload.php(50): erLhcoreClassModelGalleryFiletype->process(Object(erLhcoreClassModelGalleryImage), Array)
#5 /var/www/html/g1/lib/core/lhcore/lhmodule.php(67): include_once('/var/www/html/g...')
#6 /var/www/html/g1/lib/core/lhcore/lhmodule.php(315): erLhcoreClassModule::runModule()
#7 /var/www/html/g1/index.php(37): erLhcoreClassModule::moduleInit()
#8 {main}

Dave Sinclair

unread,
Aug 11, 2012, 1:35:02 PM8/11/12
to hppga...@googlegroups.com
After a few hours poking around I fixed a few things and possibly found a bug or two...

Problem number 1: mentioned in the initial post was due simply to the fact that 'var/tmpupload/' folder did not exist. To fix the error, simply create this folder in the hppg 'var' directory. 

Problem number 2: gallery doesn't show uploaded images. Solution, set up website section in the Amazon S3 management console. For me this simply involved ticking the 'enabled' box in the bucket properties under the 'website' tab and entering '\index.php' in the 'index document' field. Depending on your setup s3 may now work.

Problem number 3: Because I keep gallery in a sub folder within the standard apache html folder I had to make a few modifications to 'lhimageconverter.php' to ensure hppg uploaded photos to S3 using a path that included the subfolder in it. To do this I found the lines calling the S3 class and added 'g1/' before each mention of $photoDir ('g1' is the name of the folder with hppg in in my particular case). Without this measure after successfully uploading images when displaying each photo hppg would try and reach '...amazonaws.com/g1/albums...' when actually the uploaded photo would be in '...amazonaws.com/albums...'

I'm not using the latest gallery, have been tinkering/changing loads of hppg code etc so not sure if I created any of these problems or if there's a bug or two. Mentioning them all here just in case anyone comes across anything similar.

Dave
Reply all
Reply to author
Forward
0 new messages