[SOLVED] Images not showing up after gallery2 migration (thumbs are fine)

justinco

Joined: 2014-03-03
Posts: 8
Posted: Mon, 2014-03-03 08:24

Hello, I just migrated my gallery2 installation, that has been running fine on my home server (LAMP) for over 10 years, to a new hosted service. Everything went well except some images are not showing up in my more recent albums. I can see the thumbnails just fine, but there are no re-sized large images. In some of my older albums it will show one of the various re-sized images but not all of them (say I had original size, 800x600, and 1024x768 resolutions).

The only differences from my own server and the hosted service is the hosted service only has ImageMagick. My old server has that and NetPbm, Gd, and Dcraw. So, in my new hosted gallery2 settings I just have ImageMagick installed and activated. I thought maybe ImageMagick could not re-size some of my newer photos or something on the hosted service. However, to test, I went to my old server which is still running locally, and disabled all but ImageMagick and all the images continued to work fine.

I have tried just about everything I could think of. Deleted caches multiple times, re-ran the upgrade tool, tried various rewrite settings, no luck.

Examples of images not showing up, but thumbs working:
http://repo.jackmoves.com/v/justin/bmw_330/
http://repo.jackmoves.com/v/justin/silver_miata/ext_int/

Example of images showing up, but not for all image sizes (full size says 92x92):
http://repo.jackmoves.com/v/justin/bmw/grills/
http://repo.jackmoves.com/v/justin/hatch/suspension/

It seems like images that have really large resolutions are not getting processed. Almost all of my more recent photos were taken with a DSLR in high res/quality, and it seems like those ones are not working. My older albums that were taken with a different camera all work fine. Could this be a image toolkit issue, or maybe php.ini?

The error from the event log was like this one (I don't have access to mine 'cause I'm running thumbnail rebuild/resize):

Quote:
Error (ERROR_TOOLKIT_FAILURE)in modules/imagemagick/classes/ImageMagickToolkit.class at line 409
...


Gallery version = 2.3.2 core 1.3.0.2
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.3.27 cgi-fcgi
Webserver = Apache
Database = mysqli 5.5.33-31.1, lock.system=flock
Toolkits = ImageMagick, ArchiveUpload, Thumbnail
Acceleration = none/43200, none/43200
Operating system = Linux sawgrass.websitewelcome.com 3.2.46.060513.el6 #3 SMP Wed Jun 5 05:59:34 EDT 2013 x86_64
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36
Rows in GalleryAccessMap table = 117
Rows in GalleryAccessSubscriberMap table = 11182
Rows in GalleryUser table = 10
Rows in GalleryItem table = 11178
Rows in GalleryAlbumItem table = 513
Rows in GalleryCacheMap table = 0

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2014-03-03 13:36
Quote:
ImageMagickToolkit.class at line 409

this is where IM is trying to identify the type/dimensions of media it is working on and is failing.

You could try more verbose error messages
FAQ: How to set/use Gallery in debug mode?

But first I would make sure file permissions are set correctly in g2data chmod -R 0777 /path/to/g2data/

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
justinco

Joined: 2014-03-03
Posts: 8
Posted: Mon, 2014-03-03 17:55
suprsidr wrote:
Quote:
ImageMagickToolkit.class at line 409

this is where IM is trying to identify the type/dimensions of media it is working on and is failing.

You could try more verbose error messages
FAQ: How to set/use Gallery in debug mode?

But first I would make sure file permissions are set correctly in g2data chmod -R 0777 /path/to/g2data/

-s

I will see if I can get the perms changed, I can't see where I can recursively change permissions in cPanel. I have gone and manually checked image permissions however. Everything is 644 for the image files and 755 for the directories. Working images or broken images, all have same perms.

Also, here is an actual full error message for my problem:

Unable to build image
Referer	http://repo.jackmoves.com/v/justin/bmw_330/IMG_5870.JPG.html
Details	
 Error (ERROR_TOOLKIT_FAILURE)in modules/imagemagick/classes/ImageMagickToolkit.class at line 638 (GalleryCoreApi::error) 
in modules/imagemagick/classes/ImageMagickToolkit.class at line 363 (ImageMagickToolkit::_transformImage) 
in modules/core/classes/GalleryDerivative.class at line 452 (ImageMagickToolkit::performOperation) 
in modules/core/classes/GalleryDerivative.class at line 274 (GalleryDerivative::_rebuildCache) 
in modules/core/classes/GalleryDerivativeImage.class at line 153 (GalleryDerivative::rebuildCache) 
in modules/core/classes/helpers/GalleryDerivativeHelper_advanced.class at line 844 (GalleryDerivativeImage::rebuildCache) 
in modules/core/classes/GalleryCoreApi.class at line 997 (GalleryDerivativeHelper_advanced::rebuildCache) 
in modules/core/classes/helpers/GalleryDerivativeHelper_simple.class at line 50 (GalleryCoreApi::rebuildDerivativeCache) 
in modules/core/classes/GalleryCoreApi.class at line 984 (GalleryDerivativeHelper_simple::rebuildCacheIfNotCurrent) 
in modules/core/classes/helpers/GalleryDerivativeHelper_advanced.class at line 822 (GalleryCoreApi::rebuildDerivativeCacheIfNotCurrent) 
in modules/core/classes/GalleryCoreApi.class at line 997 (GalleryDerivativeHelper_advanced::rebuildCache) 
in modules/core/classes/helpers/GalleryDerivativeHelper_simple.class at line 50 (GalleryCoreApi::rebuildDerivativeCache) 
in modules/core/classes/GalleryCoreApi.class at line 984 (GalleryDerivativeHelper_simple::rebuildCacheIfNotCurrent) 
in modules/core/DownloadItem.inc at line 109 (GalleryCoreApi::rebuildDerivativeCacheIfNotCurrent) 
in main.php at line 450 (DownloadItemView::renderImmediate) 
in main.php at line 104
in main.php at line 88

Request variables: Array
(
    [view] => core.DownloadItem
    [itemId] => 55488
    [serialNumber] => 6
    [fileName] => IMG_5747.jpg

I'm working on getting the debug output as well.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2014-03-03 17:58

Looking like a permission issue.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
justinco

Joined: 2014-03-03
Posts: 8
Posted: Mon, 2014-03-03 19:21
suprsidr wrote:
Looking like a permission issue.

-s

Had hosting provider change perms, chmod -R 0777 /path/to/my/g2data_folder. Still have the problem.

 
justinco

Joined: 2014-03-03
Posts: 8
Posted: Mon, 2014-03-03 20:17

Also had hosting provider install Netpbm. I changed the settings for Netpbm to be priority and still have the problem. Different error but same issue.

Also, if it was a permission problem, how come I can click the "download photo in original format" and that works?

Image Error
Location	http://repo.jackmoves.com/main.php?g2_view=core.DownloadItem&g2_itemId=55168&g2_serialNumber=4&g2_fileName=20130511-FRA-autox02.jpg
User Id	5
Client	xxxx
Summary	Unable to build image
Referer	http://repo.jackmoves.com/v/justin/silver_miata/ext_int/
Details	
 Error (ERROR_UNKNOWN) : Could not get/convert/extract overlay in modules/netpbm/classes/NetPbmToolkit.class at line 267 (GalleryCoreApi::error) 
in modules/core/classes/GalleryDerivative.class at line 452 (NetPbmToolkit::performOperation) 
in modules/core/classes/GalleryDerivative.class at line 274 (GalleryDerivative::_rebuildCache) 
in modules/core/classes/GalleryDerivativeImage.class at line 153 (GalleryDerivative::rebuildCache) 
in modules/core/classes/helpers/GalleryDerivativeHelper_advanced.class at line 844 (GalleryDerivativeImage::rebuildCache) 
in modules/core/classes/GalleryCoreApi.class at line 997 (GalleryDerivativeHelper_advanced::rebuildCache) 
in modules/core/classes/helpers/GalleryDerivativeHelper_simple.class at line 50 (GalleryCoreApi::rebuildDerivativeCache) 
in modules/core/classes/GalleryCoreApi.class at line 984 (GalleryDerivativeHelper_simple::rebuildCacheIfNotCurrent) 
in modules/core/classes/helpers/GalleryDerivativeHelper_advanced.class at line 822 (GalleryCoreApi::rebuildDerivativeCacheIfNotCurrent) 
in modules/core/classes/GalleryCoreApi.class at line 997 (GalleryDerivativeHelper_advanced::rebuildCache) 
in modules/core/classes/helpers/GalleryDerivativeHelper_simple.class at line 50 (GalleryCoreApi::rebuildDerivativeCache) 
in modules/core/classes/GalleryCoreApi.class at line 984 (GalleryDerivativeHelper_simple::rebuildCacheIfNotCurrent) 
in modules/core/DownloadItem.inc at line 109 (GalleryCoreApi::rebuildDerivativeCacheIfNotCurrent) 
in main.php at line 450 (DownloadItemView::renderImmediate) 
in main.php at line 104
in main.php at line 88

Request variables: Array
(
    [view] => core.DownloadItem
    [itemId] => 55168
    [serialNumber] => 4
    [fileName] => 20130511-FRA-autox02.jpg
)
 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2014-03-03 20:21

Line 638 is where gallery is trying to do the actual work on the image in the data.gallery.tmp directory. If the permissions are not correct on this directory, gallery won't be able to work there.

	list ($success, $output) = $platform->exec(array($command));
	if (!$success) {
	    @$platform->unlink($tmpFilename);
	    $platform->chdir($oldCwd);
	    return GalleryCoreApi::error(ERROR_TOOLKIT_FAILURE);
	}

Does your IM toolkit pass its tests?

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
justinco

Joined: 2014-03-03
Posts: 8
Posted: Mon, 2014-03-03 20:43
suprsidr wrote:
Line 638 is where gallery is trying to do the actual work on the image in the data.gallery.tmp directory. If the permissions are not correct on this directory, gallery won't be able to work there.

	list ($success, $output) = $platform->exec(array($command));
	if (!$success) {
	    @$platform->unlink($tmpFilename);
	    $platform->chdir($oldCwd);
	    return GalleryCoreApi::error(ERROR_TOOLKIT_FAILURE);
	}

Does your IM toolkit pass its tests?

-s

Yes, it passes. See attached. I will confirm the permissions myself when I get a chance. I suppose the hosting provider could have gotten it wrong.

 
justinco

Joined: 2014-03-03
Posts: 8
Posted: Tue, 2014-03-04 03:35

So I checked the permissions, everything was 777 except for the g2data/tmp/ directory. I changed that and still no luck. Debugging is enabled but I see nothing that indicates a problem myself yet.

 
justinco

Joined: 2014-03-03
Posts: 8
Posted: Tue, 2014-03-04 06:12

As a test, I re-added the first picture in this album, through gallery.

http://repo.jackmoves.com/v/justin/bmw_330/

The newly uploaded picture works just fine. It is the first picture in the album. I am doing some re-upload tests of some images to see what happens.

 
justinco

Joined: 2014-03-03
Posts: 8
Posted: Tue, 2014-03-04 07:30

After a bunch of testing and trying different things, I think I finally found the problem.

My watermarks (in plugins_data folder) got corrupted somehow in the migration and were somehow causing the images to not render properly. I replaced them with good ones and things are better, I am seeing good resized images now for the most part. Although there are still some images being resized at 92x92 for some reason.

I'm going to put it in maintenance mode and re-upload all my original album images directly this time (as opposed to zipped and unzipped like I did for the migration).

Figure out tomorrow what to do with the remaining images having problems.