"Unable to process this photo" when uploading photos

cnakamoto
cnakamoto's picture

Joined: 2009-11-12
Posts: 10
Posted: Sun, 2011-08-07 16:23

I have reviewed all the posts that I could find for Gallery 3 and this type of problem but none of them has helped me yet. My Gallery 3.01 installation was working fine, but after upgrading to 3.02 Gallery cannot seem to recreate any images.

Here are the details:

- when I upload a photo, the photo is successfully uploaded to the album directory but I get the "Unable to process this photo" message in the photo uploader

- when I browse to the album, the photo placeholder is there (but no thumbnail), I can click the photo link and that works but there is no resized version, when I click for the full resolution version, it works (e.g. http://gallery.nakamoto.ca/index.php/2011/2011juncal, try any photo here)

- I have GD and ImageMagick installed and they seem to work fine outside of Gallery (and both were working with my 3.01 installation). I have tried both and neither work

- the log shows these messages when I try to generate a resized photo:

Quote:
2011-08-07 11:18:24 -05:00 --- error: Caught exception rebuilding image: June Calgary Trip
@todo EMPTY_INPUT_FILE
#0 [internal function]: gallery_graphics_Core::resize('/chroot/home/ga...', '/chroot/home/ga...', Array, Object(Item_Model))
#1 /chroot/home/galleryn/gallery.nakamoto.ca/html/modules/gallery/helpers/graphics.php(173): call_user_func_array('gallery_graphic...', Array)
#2 /chroot/home/galleryn/gallery.nakamoto.ca/html/modules/gallery/helpers/item.php(110): graphics_Core::generate(Object(Item_Model))
#3 /chroot/home/galleryn/gallery.nakamoto.ca/html/modules/gallery/helpers/gallery_event.php(123): item_Core::make_album_cover(Object(Item_Model))
#4 /chroot/home/galleryn/gallery.nakamoto.ca/html/modules/gallery/helpers/module.php(378): gallery_event_Core::item_deleted(Object(Item_Model))
#5 /chroot/home/galleryn/gallery.nakamoto.ca/html/modules/gallery/models/item.php(117): module_Core::event('item_deleted', Object(Item_Model))
#6 /chroot/home/galleryn/gallery.nakamoto.ca/html/modules/gallery/controllers/quick.php(108): Item_Model_Core->delete()
#7 [internal function]: Quick_Controller->delete('16124')
#8 /chroot/home/galleryn/gallery.nakamoto.ca/html/system/core/Kohana.php(331): ReflectionMethod->invokeArgs(Object(Quick_Controller), Array)
#9 [internal function]: Kohana_Core::instance(NULL)
#10 /chroot/home/galleryn/gallery.nakamoto.ca/html/system/core/Event.php(208): call_user_func_array(Array, Array)
#11 /chroot/home/galleryn/gallery.nakamoto.ca/html/application/Bootstrap.php(67): Event_Core::run('system.execute')
#12 /chroot/home/galleryn/gallery.nakamoto.ca/html/index.php(102): require('/chroot/home/ga...')
#13 {main}
2011-08-07 11:18:24 -05:00 --- error: Exception [ 0 ]: @todo EMPTY_INPUT_FILE
/chroot/home/galleryn/gallery.nakamoto.ca/html/modules/gallery/helpers/gallery_graphics.php [ 57 ]
#0 [internal function]: gallery_graphics_Core::resize('/chroot/home/ga...', '/chroot/home/ga...', Array, Object(Item_Model))
#1 /chroot/home/galleryn/gallery.nakamoto.ca/html/modules/gallery/helpers/graphics.php(173): call_user_func_array('gallery_graphic...', Array)
#2 /chroot/home/galleryn/gallery.nakamoto.ca/html/modules/gallery/helpers/item.php(110): graphics_Core::generate(Object(Item_Model))
#3 /chroot/home/galleryn/gallery.nakamoto.ca/html/modules/gallery/helpers/gallery_event.php(123): item_Core::make_album_cover(Object(Item_Model))
#4 /chroot/home/galleryn/gallery.nakamoto.ca/html/modules/gallery/helpers/module.php(378): gallery_event_Core::item_deleted(Object(Item_Model))
#5 /chroot/home/galleryn/gallery.nakamoto.ca/html/modules/gallery/models/item.php(117): module_Core::event('item_deleted', Object(Item_Model))
#6 /chroot/home/galleryn/gallery.nakamoto.ca/html/modules/gallery/controllers/quick.php(108): Item_Model_Core->delete()
#7 [internal function]: Quick_Controller->delete('16124')
#8 /chroot/home/galleryn/gallery.nakamoto.ca/html/system/core/Kohana.php(331): ReflectionMethod->invokeArgs(Object(Quick_Controller), Array)
#9 [internal function]: Kohana_Core::instance(NULL)
#10 /chroot/home/galleryn/gallery.nakamoto.ca/html/system/core/Event.php(208): call_user_func_array(Array, Array)
#11 /chroot/home/galleryn/gallery.nakamoto.ca/html/application/Bootstrap.php(67): Event_Core::run('system.execute')
#12 /chroot/home/galleryn/gallery.nakamoto.ca/html/index.php(102): require('/chroot/home/ga...')
#13 {main}

Any help would be greatly appreciated, thanks!

p.s. I think I had a similar problem when I first installed G3 but for the life of me I cannot remember how I fixed it!
p.p.s. I have full control over the server where G3 is hosted

 
cnakamoto
cnakamoto's picture

Joined: 2009-11-12
Posts: 10
Posted: Sun, 2011-08-07 17:06

OK, I think I figured out my problem. I noticed that I had not reinstalled the Square Thumbails module after my 3.02 upgrade so I did that, and now it is working. I don't know why that made a difference, but it seems to be fine now!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2011-08-07 17:40

Glad you got it sorted, and for following up with you findings. It might help other in the future with similar issues.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
DoctorWatson

Joined: 2007-01-25
Posts: 30
Posted: Tue, 2011-08-09 07:18

Just a few hours ago I came across the same "Unable to process this photo" problem. I was uploading a number of photos in JPG format. They were uploading fine, but then one of them produced "Unable to process this photo". The others kept on uploading and then a second photo got the same error.
So I thought that there was something wrong with them. I checked them using ACDSee, edited them, saved them again. Nothing seemed to be wrong. Tried to upload them again. Same error.
Still convinced that the photos themselves were the culprit I played the following "trick" (I like to experiment) : Edited them and saved them as GIFs. Deleted the JPGs. Edited the GIF's and saved them back to JPGs. And lo ! They uploaded fine. Seems like my little experiment kind of "purified" the JPG's.
I hope the developers find this interesting, because they might start looking for an error in G3 that isn't there.

 
ralphenator
ralphenator's picture

Joined: 2011-04-08
Posts: 5
Posted: Sat, 2011-11-05 18:52

I read this posting as well as others describing this problem. The first message describes my problem very closely. I have tried both solutions listed here and they don't work for me.

I have used Gallery3.0.2 for many months on 3 different websites with no problems. Now, very suddenly, I see the same problem on all the websites (hosted from the same server). When I upload some pictures, I get the error message "unable to process this photo", with the thumbnail and mid-size image missing. The full-size image is ok. Some .jpgs work, others don't, and this is not related to size. Here is the error log:

<?php defined('SYSPATH') or die('No direct script access.'); ?>

2011-11-05 10:13:29 -05:00 --- error: Kohana_Exception [ 403 ]: @todo FORBIDDEN
/home/rsimpson/public_html/historysj/modules/gallery/helpers/access.php [ 202 ]
#0 /home/rsimpson/public_html/historysj/modules/gallery/helpers/access.php(129): access_Core::forbidden()
#1 /home/rsimpson/public_html/historysj/modules/gallery/controllers/uploader.php(24): access_Core::required('add', Object(Item_Model))
#2 [internal function]: Uploader_Controller->index('296')
#3 /home/rsimpson/public_html/historysj/system/core/Kohana.php(331): ReflectionMethod->invokeArgs(Object(Uploader_Controller), Array)
#4 [internal function]: Kohana_Core::instance(NULL)
#5 /home/rsimpson/public_html/historysj/system/core/Event.php(208): call_user_func_array(Array, Array)
#6 /home/rsimpson/public_html/historysj/application/Bootstrap.php(67): Event_Core::run('system.execute')
#7 /home/rsimpson/public_html/historysj/index.php(102): require('/home/rsimpson/...')
#8 {main}
2011-11-05 10:13:29 -05:00 --- error: Missing messages entry kohana/core.errors.403 for message kohana/core

I am not experienced with code or very technical, just trying to get this thing to work. I would rather not reinstall Gallery3 and go through the work of reloading all my pictures (about 2,000), so any help in getting this fixed is greatly appreciated.

Thanks,
Ralph

 
ralphenator
ralphenator's picture

Joined: 2011-04-08
Posts: 5
Posted: Sat, 2011-11-05 19:36

I forgot to leave the link for seeing an example of my problem. The link below will show a sub-album with one picture displaying correctly and 2 additional pictures which are not working. The thumbnail and mid-size pictures are not there, but you can click on the spaces and get to the full-size pictures.

http://ciphermachines.com/historysj/index.php/Klystron#

Thanks,
Ralph

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2011-11-08 05:18

Ralph, a link to the originals:
http://ciphermachines.com/historysj/var/albums/Klystron/ I only see the one item. I don't see the additional items you say you added.
Can you see if you can reproduce the issue again if you deleted the items?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
ralphenator
ralphenator's picture

Joined: 2011-04-08
Posts: 5
Posted: Tue, 2011-11-08 17:09

Hello Dave,
Apologies for deleting those 2 pictures, I have now reposted them. Again, the thumbnail and mid-size pictures are not there, but you can click on the space they should occupy and get to the final large-size picture.

More info on these pictures: they were all scans using an Epson scanner set at 600dpi. On another sub-album some of the scans worked and others failed also. It is not related to size of the image, since some that worked are 5MB and some that fail are 1MB.

I exchanged some emails with my hosting service and they tell me there has not been any changes to their systems (but I have heard that before).

Thanks for the help!
Ralph

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2011-11-08 23:33

I would suspect that the image toolkit you are using bails out for some reason on these images. See if you can chnage the image toolkit. It could very well be a size issue as-well, as the one item that does show thumb and resize is under 1Meg.
The larger image works for me:
http://www.langleycom.com/gallery3/index.php/Test1/poulsen-wireless-1ax
It is a FAQ for G2 but it is still relevant:
FAQ: Why can't I upload big files (over a megabyte or two)?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
ralphenator
ralphenator's picture

Joined: 2011-04-08
Posts: 5
Posted: Wed, 2011-11-09 00:43

The image toolkit I am using is GD, but I don't see how I can change it. ImageMagick and GraphicsMagick both show up under "available toolkits" but they are faded out and it says they could not be located on my system.

I have 2000 images on 3 different Galleries and almost all the pictures are 3-5 MB, this is the first time I have had this problem. Here is another link showing some more images from the same source (Epson scanner) taken on the same day. You will see 3 pictures, up to 5MB that worked, and 3 other images that did not work. Those that did not work are sized from 2.5-4 MB. So, as I said initially, I don't think the issue is file size.

http://www.ciphermachines.com/historysj/index.php/Stock-Certificates

GD could be an issue, but after reading many other posts, it seems there is a general problem that has never really been solved. Different people have done things that should have no impact, yet in some cases their problem magically went away. Others had to reinstall Gallery3. I have tried those things, short of reinstalling Gallery3, and it has not fixed my problem.

Any other suggestions?

Ralph

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2011-11-09 01:43

Ask you host to install ImageMagick or GraphicsMagick. GD is a memory hog and has to share with other php applications during run time.
http://codex.gallery2.org/Installing_an_Image_Processing_Library#Why_does_GD_cause_my_PHP_script_to_run_out_of_memory.3F

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
ralphenator
ralphenator's picture

Joined: 2011-04-08
Posts: 5
Posted: Wed, 2011-11-09 09:01

After several interactions with my hosting support, they finally installed ImageMagick without requiring me to reinstall Gallery3. That fixed my problem.

Many Thanks!

Ralph

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2011-11-09 13:59

Glad you got it sorted out.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team