[SOLVED] "Unable to process this photo" in gallery 3.0.4

beesatmsu

Joined: 2003-05-19
Posts: 58
Posted: Mon, 2013-08-19 17:38

This is pretty wierd.

I have two galleries installed on the same physical machine but different domain and one works (http://cyberbee.net/gallery) and one not (http://ww3.beetography.com).

both were working before and then I did something (probably moving dir to a different path) and the 2nd one stopped working.

the symptoms were I cannot upload any photos.

it will always say "Unable to process this photo" after a "!" in red and the file name.

it appears the photos are uploaded to /usr/home/xxx/xxx/var/albums/ but it could not create the water-marked files into var/resizes.

this is not related to php not having enough memory or anything.

I checked all the file structures and they appeared to be the same for both domains. all have files and dirs owned by www in both cases and all have the permission as:

drwxr-xr-x

so I am pretty much out of ideas!

will upgrading to the latest gallery fix this problem? not sure.

Zach de BeeGuy

 
beesatmsu

Joined: 2003-05-19
Posts: 58
Posted: Tue, 2013-08-20 16:02

I upgraded to 3.0.9 today and it is a bit better. most images were uploaded (except one says unable to process), but all of them show a broken jpeg image, when I click on each photo (twice, first time an individual broken icon, 2nd time it shows the image fine --correct size and with water mark.

rebuilding images did not help.

also the url to the images directly did not work:

http://ww2.beetography.com/var/resizes/Apis-mellifera/China/Lotus/DSD_1499.jpg

shows a broken jpg, the same as the normal view.

 
beesatmsu

Joined: 2003-05-19
Posts: 58
Posted: Tue, 2013-08-20 16:07

but i can link the image this way (it works).

http://ww2.beetography.com/var/albums/Apis-mellifera/China/Lotus/DSD_1524.jpg?m=1377014122

if I try : http://ww2.beetography.com/var/albums/Apis-mellifera/China/Lotus/

I got an error:

Apache: Apache/2.2.17 (FreeBSD) mod_ssl/2.2.17 OpenSSL/0.9.8n DAV/2 PHP/5.3.6 with Suhosin-Patch
PHP: 5.3.6
MySQL: 5.1.54
Server load: 0 0.02392578125 0
Graphics toolkit: imagemagick

Gallery stats

Version: 3.0.9 (Chartres)
Albums: 23
Photos: 193

Kohana_404_Exception [ Page Not Found ]: The page you requested, file_proxy/Apis-mellifera/China/Lotus, could not be found.

MODPATH/gallery/controllers/file_proxy.php[ 110 ]
105 throw $e; 106 } 107 108 // Don't try to load a directory 109 if ($type == "albums" && $item->is_album()) { 110 $e = new Kohana_404_Exception(); 111 $e->test_fail_code = 6; 112 throw $e; 113 } 114 115 // Note: this code is roughly duplicated in data_rest, so if you modify this, please look to

{PHP internal call} » File_Proxy_Controller->__call( arguments )

SYSPATH/core/Kohana.php[ 331 ] » ReflectionMethod->invokeArgs( arguments )

{PHP internal call} » Kohana_Core::instance( arguments )

SYSPATH/core/Event.php[ 208 ] » call_user_func_array( arguments )

APPPATH/Bootstrap.php[ 67 ] » Event_Core::run( arguments )

DOCROOT/index.php[ 116 ] » require( arguments )

Yet, if I go to that dir, I saw these files. it seems only an error for listing the files there on the web.

Zach de BeeGuy

 
beesatmsu

Joined: 2003-05-19
Posts: 58
Posted: Tue, 2013-08-20 16:52

I tried to sue GD instead of Imagemagik and still do not work.

I even tried to copy everything from a working gallery3.0.4 (cyberbee.net/gallery) to the non-working one and still it does not seem to work.

Zach de BeeGuy

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2013-08-20 17:22

Both of those return a file not found error.
Did you have some permission set on this album?
Looking at
http://ww2.beetography.com/var/albums/ I get a file not found yet:
http://ww2.beetography.com/var/resizes/ and http://ww2.beetography.com/var/thumbs/ I get a directory listing.

What I would do is remove all permisions from all albums using the G# permissions user interface.
Then make sure that there is no .htaccess file in any of the /var/* directory's. Verify file system permissions of the /var/* directories so that the user the web-server runs as can write to those.

Test a upload again.

Dave

____________________________________________
Blog & G2 || floridave - Gallery Team

 
beesatmsu

Joined: 2003-05-19
Posts: 58
Posted: Tue, 2013-08-20 18:41

Thanks, Dave.

I removed a .htaccess file inside var/albums
i used "edit permissions" and they appear to be right for the album.
I uploaded new files, or rebuilt the images and still has broken icon.

http://ww2.beetography.com/index.php/Apis-mellifera/China2

all files have:

drwxr-xr-x 2 www www

while httpd.conf specified that apache2.2 uses www.

Zach de BeeGuy

 
beesatmsu

Joined: 2003-05-19
Posts: 58
Posted: Tue, 2013-08-20 19:08

I wonder if these in my "rebuild image log" says perhaps I changed the name (e.g. gallery) to something else and the gallery is now confused...
Task Rebuild Images started (task id 23)
Unable to rebuild images for 'DSD 1514'
exception 'Exception' with message '@todo UNREADABLE_FILE' in /usr/home/beetography/ww2/modules/gallery/helpers/photo.php:104
Stack trace:
#0 /usr/home/beetography/ww2/modules/gallery/helpers/gallery_graphics.php(145): photo_Core::get_file_metadata('/usr/home/beeto...')
#1 [internal function]: gallery_graphics_Core::composite('/usr/home/beeto...', '/usr/home/beeto...', Array, Object(Item_Model))
#2 /usr/home/beetography/ww2/modules/gallery/helpers/graphics.php(171): call_user_func_array('gallery_graphic...', Array)
#3 /usr/home/beetography/ww2/modules/gallery/helpers/gallery_task.php(111): graphics_Core::generate(Object(Item_Model))
#4 [internal function]: gallery_task_Core::rebuild_dirty_images(Object(Task_Model))
#5 /usr/home/beetography/ww2/modules/gallery/helpers/task.php(90): call_user_func_array('gallery_task::r...', Array)
#6 /usr/home/beetography/ww2/modules/gallery/controllers/admin_maintenance.php(195): task_Core::run('23')
#7 [internal function]: Admin_Maintenance_Controller->run('23')
#8 /usr/home/beetography/ww2/modules/gallery/controllers/admin.php(62): call_user_func_array(Array, Array)
#9 [internal function]: Admin_Controller->__call('maintenance', Array)
#10 /usr/home/beetography/ww2/system/core/Kohana.php(331): ReflectionMethod->invokeArgs(Object(Admin_Controller), Array)
#11 [internal function]: Kohana_Core::instance(NULL)
#12 /usr/home/beetography/ww2/system/core/Event.php(208): call_user_func_array(Array, Array)
#13 /usr/home/beetography/ww2/application/Bootstrap.php(67): Event_Core::run('system.execute')
#14 /usr/home/beetography/ww2/index.php(116): require('/usr/home/beeto...')
#15 {main}

no, I renamed it as "gallery" and changed the httpd.conf and noticed no difference.

Zach de BeeGuy

 
beesatmsu

Joined: 2003-05-19
Posts: 58
Posted: Tue, 2013-08-20 19:40

Dave, although my working domain (cyberbee.net/gallery) has .htaccess inside var/albums.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule (.*) /gallery/index.php?kohana_uri=/file_proxy/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
Order Deny,Allow
Deny from All
</IfModule>

and another log says:

adminID 2013-Aug-20 18:39:23 Couldn't create a thumbnail or resize for DSD 1563 details
adminID 2013-Aug-20 18:39:23 Couldn't create a thumbnail or resize for DSD 1499 details

but details link does not say anything.

Zach de BeeGuy

 
beesatmsu

Joined: 2003-05-19
Posts: 58
Posted: Mon, 2013-08-26 15:22

it appears that the uploaded files are uploaded to /var/albums correctly, but resizing to /var/resizes or to thumbs /var/thumbs are not working correctly. they created broken (identical size) icon for jpeg instead. will see if the http logs have more details.

strange problem.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2013-08-26 16:11

I would suspect that the image toolkit just dies or is killed by the server/host. There is not a good method of detecting this failure in all hosted environments. The servers error log might yield a clue.
Try a different image toolkit. If using GD only try with small images as it has some resource imitations.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
beesatmsu

Joined: 2003-05-19
Posts: 58
Posted: Mon, 2013-08-26 16:48

Thanks, Dave. but on the same server, cyberbee.net/gallery works fine. I have been uploading to that instead. so something settings might be slightly different for my non working ones...

Zach

floridave wrote:
I would suspect that the image toolkit just dies or is killed by the server/host. There is not a good method of detecting this failure in all hosted environments. The servers error log might yield a clue.
Try a different image toolkit. If using GD only try with small images as it has some resource imitations.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

Zach de BeeGuy

 
beesatmsu

Joined: 2003-05-19
Posts: 58
Posted: Mon, 2013-08-26 17:46

Running out of ideas, I edited the water mark (changing the % either up or down) and rebuild all the images...now everything works! something went wrong when I moved the files, with the water mark file, so it could not process the /var/resizes/...strange....err log had nothing...

case resolved! thanks Dave for trying different things...