[SOLVED] Trouble Porting Gallery 2 to a new server

ewalton

Joined: 2011-08-13
Posts: 20
Posted: Sat, 2011-08-13 23:04

Hello,

I have just ported gallery2 to a new server.
Things seemed to go OK when following your instructions
(http://codex.gallery2.org/Gallery2:FAQ#How_can_I_move_my_Gallery_installation_from_one_server_to_another.3F)
All of the albums seemed to show up, but I later found that there were some problems.

Some albums (but not all) do not display the resized images.
Most full-sized images do display properly.
All of the albums are in the same g2data folder. and I don't know of any relevant difference between the images that display properly an those that don't.
The top level album thumbnails all display properly, and some of the lower level albums display properly, but not all.
Within an album, I have the active target size set to 768 X 768 pixels but when I see the sizes available for a typical problematic image,
the available sizes are 92X92 pixels (but I actually see only a grey-blue icon instead of that picture)
and the full sized image (2323 X 1678 pixels) which does display properly.

I tried to rebuild all thumbnails/resizes (from the gallery maintenence panel), and I got an error dump, followed by a success message.
Here is an excerpt (the dump was quite large) and my system information is below the dump. The resize process didn't help.
I suspected that the problem may be related to the protection of the g2data folder, so I asked the sysop to repeat the chmod 777 step to that folder,
as per the transfer instructions, but repeating that step did not help either.

I hope that you can help.

Thanks very much.

___________________________________________________________________________________________
Debug output for failed items:

file_exists(/home/crfgor5/public_html/g2/g2data_2.3/cache/entity/6/9/6913.inc)
file_exists(/home/crfgor5/public_html/g2/g2data_2.3/cache/derivative/6/9/6913.dat)
file_exists(/home/crfgor5/public_html/g2/g2data_2.3/cache/entity/6/9/6912.inc)
fopen(/home/crfgor5/public_html/g2/g2data_2.3/locks/6913, wb+, 0)
flock(Resource id #2636, 6, )

(mysqli): SELECT g_id, g_entityType FROM g2_Entity WHERE g_id IN (6913)
(mysqli): SELECT g2_DerivativeImage.g_width, g2_DerivativeImage.g_height,
g2_Derivative.g_derivativeSourceId, g2_Derivative.g_derivativeOperations,
g2_Derivative.g_derivativeOrder, g2_Derivative.g_derivativeSize,
g2_Derivative.g_derivativeType, g2_Derivative.g_mimeType,
g2_Derivative.g_postFilterOperations, g2_Derivative.g_isBroken,
g2_ChildEntity.g_parentId, g2_Entity.g_id, g2_Entity.g_creationTimestamp,
g2_Entity.g_isLinkable, g2_Entity.g_linkId,
g2_Entity.g_modificationTimestamp, g2_Entity.g_serialNumber,
g2_Entity.g_entityType, g2_Entity.g_onLoadHandlers FROM g2_DerivativeImage,
g2_Derivative, g2_ChildEntity, g2_Entity WHERE g2_DerivativeImage.g_id IN
(6913) AND g2_Derivative.g_id=g2_DerivativeImage.g_id AND
g2_ChildEntity.g_id=g2_DerivativeImage.g_id AND
g2_Entity.g_id=g2_DerivativeImage.g_id
______________________________________________________________________________________________

Gallery URL = http://biz107.inmotionhosting.com/~crfgor5/g2/main.php
Gallery version = 2.3.1 core 1.3.0.1
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.17 cgi
Webserver = Apache
Database = mysqli 5.0.92-community-log, lock.system=flock
Toolkits = ArchiveUpload, Exif, Ffmpeg, Getid3, ImageMagick, LinkItemToolkit, Thumbnail, Gd
Acceleration = none, none
Operating system = Linux biz107.inmotionhosting.com 2.6.18-238.12.1.el5 #1 SMP Tue May 31 13:22:04 EDT 2011 x86_64
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50
Rows in GalleryAccessMap table = 78
Rows in GalleryAccessSubscriberMap table = 2446
Rows in GalleryUser table = 45
Rows in GalleryItem table = 2436
Rows in GalleryAlbumItem table = 22
Rows in GalleryCacheMap table = 0

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7892
Posted: Sun, 2011-08-14 14:28
Quote:
the available sizes are 92X92 pixels (but I actually see only a grey-blue icon instead of that picture)

That is gallery's default missing image icon.

Make sure your g2data directory permissions are 777 recursively
chmod -R 0777 path/to/g2data

Make sure your image toolkit is installed and tests properly
de-activate rewrite
rebuild thumbs and resizes for the troubled albums (edit album -> album tab -> Apply settings to existing items)

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
ewalton

Joined: 2011-08-13
Posts: 20
Posted: Sun, 2011-08-14 21:17

Hi again,

What do you mean by de-activate rewrite? Do you mean the rewrite for URLs? I do not have that activated.

I tried to rebuild

There is some additional error information (see below) that may be useful
This came after again using the 'Build all thumbnails/resizes' in the maintenance panel
This error data only appears momentarily.

When I try to rebuild the images from within a problematic album, I get no error message at all,
but I still only see gallery's default missing image icon afterwards.

I also deactivated and re-activated the Gd and ImageMagick toolkits.
FFMPEG is the only other toolkit installed, but that is only for video, as far as I understand

Thanks once again

Processing image 4771 of 4771

Memory used: 25715880, total: 512M
Error (ERROR_STORAGE_FAILURE) : Empty sequence id!
in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 494 (GalleryCoreApi::error)
in modules/core/classes/GalleryStorage.class at line 1872 (GalleryStorageExtras::_getUniqueIdWithConnection)
in modules/core/classes/helpers/MaintenanceHelper_simple.class at line 100 (MySqlStorage::getUniqueId)
in modules/core/AdminMaintenance.inc at line 132 (MaintenanceHelper_simple::addRun)
in ??? at line 0 (AdminMaintenanceController::runTask)
in modules/core/classes/GalleryTemplateAdapter.class at line 1089
in g2data_2.3/smarty/templates_c/%%2910355218/matrix/%%3A^3A8^3A818B59%%theme.tpl.php at line 75 (GalleryTemplateAdapter::trailer)
in lib/smarty/Smarty.class.php at line 1255
in modules/core/classes/GallerySmarty.class at line 61 (Smarty::fetch)
in modules/core/classes/GalleryTemplate.class at line 241 (GallerySmarty::fetch)
in main.php at line 506 (GalleryTemplate::display)
in main.php at line 104
in main.php at line 88

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7892
Posted: Mon, 2011-08-15 01:22

Make sure you clear gallery's caches
FAQ: How can I clear cached data?

Run imagemagick's tests, and if it passes - uninstall GD

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
ewalton

Joined: 2011-08-13
Posts: 20
Posted: Mon, 2011-08-15 08:01

Hi again,

I cleared the caches, and ran the Imagemagick test. both GD and Imagemagick show that they are passing, so I uninstalled Gd.
The problem still did not go away.

Thanks again.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7892
Posted: Mon, 2011-08-15 11:52
 
ewalton

Joined: 2011-08-13
Posts: 20
Posted: Tue, 2011-08-16 19:55

Hi, Me again,

The FAQ that you referred me to contained a link to an IANA page that had no Gallery information http://example.com/gallery2/lib/support
The FAQ also recommended accessing the Filesystem Permissions page which should be available in G2.1.1 and later.
Since I am using Gallery version = 2.3.1 core 1.3.0.1 so I expect that page is available in Gallery, but I just cannot find it.
Does that reference mean the permissions pages for Albums, or is there a special page that I am overlooking?
I do not see the Fix the storage folder (make it writeable) tool anywhere in Gallery.
I found the separate script to change the filesystems permissions which is run independently, but I suspect that the FAQ meant running something within gallery.

The albums with a problem don't show the resized images, but they show the full sized images so if I am missing a photo, it seems that it would be an image that Gallery created.
I have some albums set such that everyone can view resized images but only certain users can view all versions.
When I login as administrator I can see photos in those albums (but not the resized versions) but I see only icons when I am not logged in.
That indicates to me that the photos are there but Gallery is is having some trouble with the resized images.

Thanks again.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7892
Posted: Tue, 2011-08-16 21:02
Quote:
The FAQ that you referred me to contained a link to an IANA page that had no Gallery information http://example.com/gallery2/lib/support

so you're telling me you could not put this together?
http://biz107.inmotionhosting.com/~crfgor5/g2/lib/support/

also try debug mode
FAQ: How to set/use Gallery in debug mode?

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
ewalton

Joined: 2011-08-13
Posts: 20
Posted: Wed, 2011-08-17 01:02

Hello again,

Sorry, making those substitutions should have been obvious to me, but it wasn't.
In any case I was finally able to get to the page, and performed cache maintenance on everything including thumbnails and resizes.
The problem is still there.
I also went into debug mode and the report is below.

Thanks again for your help.

file_exists(/home/crfgor5/public_html/g2/g2data_2.3/cache/module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc)
Unimplemented: GalleryUrlGenerator
getParameter language.useBrowserPref for core plugin
file_exists(/home/crfgor5/public_html/g2/g2data_2.3/cache/module/core/0/0/0.inc)
getParameter default.language for core plugin
controller core.UserLogin, view
Loading plugin core
Class not defined, trying to include it.
file_exists(/home/crfgor5/public_html/g2/modules/core/module.inc)
core plugin successfully instantiated
file_exists(/home/crfgor5/public_html/g2/g2data_2.3/versions.dat)
file(/home/crfgor5/public_html/g2/g2data_2.3/versions.dat, )
file_exists(/home/crfgor5/public_html/g2/modules/httpauth/classes/HttpAuthPlugin.class)
file_exists(/home/crfgor5/public_html/g2/g2data_2.3/cache/module/httpauth/0/0/0.inc)
getParameter id.anonymousUser for core plugin
[1313542309] can't guarantee 5 -- extending!
file_exists(/home/crfgor5/public_html/g2/g2data_2.3/cache/entity/0/0/5.inc)
Loading plugin core
core plugin successfully instantiated
Check the version of the core plugin
file_exists(/home/crfgor5/public_html/g2/g2data_2.3/cache/module/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc)
The version of the core plugin is ok
file_exists(/home/crfgor5/public_html/g2/modules/core/UserLogin.inc)

(mysqli): SET NAMES "utf8"

(mysqli): SELECT g2_Schema.g_info FROM g2_PluginMap, g2_Schema
WHERE g2_PluginMap.g_pluginId = g2_Schema.g_pluginId
AND g2_Schema.g_type = 'map' AND g2_PluginMap.g_active = 1

(mysqli): SELECT g_count, g_lastAttempt FROM g2_FailedLoginsMap WHERE
g_userName='admin'

(mysqli):
SELECT
g2_User.g_id
FROM
g2_User
WHERE
g2_User.g_userName = 'admin'

file_exists(/home/crfgor5/public_html/g2/g2data_2.3/cache/entity/0/0/6.inc)
getParameter validation.level for core plugin
file_exists(/home/crfgor5/public_html/g2/modules/captcha/classes/CaptchaValidationPlugin.inc)
getParameter failedAttemptThreshold for captcha plugin
file_exists(/home/crfgor5/public_html/g2/g2data_2.3/cache/module/captcha/0/0/0.inc)
getParameter failCount-core.UserLogin.admin for captcha plugin

(mysqli): BEGIN

(mysqli): DELETE FROM g2_FailedLoginsMap WHERE g_userName='admin'

getParameter cookie.domain for core plugin
getParameter cookie.path for core plugin
getParameter session.lifetime for core plugin
Loading plugin core
core plugin successfully instantiated
Check the version of the core plugin
The version of the core plugin is ok
getParameter id.anonymousUser for core plugin

(mysqli): SET NAMES "utf8"

(mysqli): INSERT INTO g2_SessionMap (g_id, g_userId, g_remoteIdentifier,
g_creationTimestamp, g_modificationTimestamp, g_data) VALUES
('b08844817e1bbcb3ba807eda95b723b7',6,'a:2:{i:0;s:12:\"76.91.70.159\";i:1;s:32:\"50ef1d0268ae4ba506ff6488559644eb\";}',1313542309,1313542309,'a:1:{s:13:\"core.language\";s:5:\"en_US\";}')

getParameter session.lifetime for core plugin
Loading plugin userinfo
Class not defined, trying to include it.
file_exists(/home/crfgor5/public_html/g2/modules/userinfo/module.inc)
userinfo plugin successfully instantiated

(mysqli): update g2_SequenceId set id=LAST_INSERT_ID(id+1);

(mysqli): INSERT INTO g2_UserinfoMap (g_id, g_userId, g_userName,
g_ipAddress, g_timeStamp, g_action) VALUES
(7934,'6','admin','76.91.70.159','1313542309','Login')

getParameter session.lifetime for core plugin

(mysqli): UPDATE g2_SessionMap SET g_userId=6,
g_remoteIdentifier='a:2:{i:0;s:12:\"76.91.70.159\";i:1;s:32:\"50ef1d0268ae4ba506ff6488559644eb\";}',
g_creationTimestamp=1313542309, g_modificationTimestamp=1313542309,
g_data='a:2:{s:13:\"core.language\";s:5:\"en_US\";s:34:\"session.siteAdminActivityTimestamp\";i:1313542309;}'
WHERE g_id='b08844817e1bbcb3ba807eda95b723b7'

(mysqli): COMMIT

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7892
Posted: Wed, 2011-08-17 01:22

there is no error in that debug, is that debug what you see while viewing one of the failed items?

BTW, please copy debug info to a txt file and attach it to your post.
Posting long debugs is not polite.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
ewalton

Joined: 2011-08-13
Posts: 20
Posted: Wed, 2011-08-17 04:55

Sorry about the etiquette fail.

Here is the debug file.
I also noticed that even after I took gallery out of debug mode and refreshed the page, the debug info remained.

Perhaps that is also a clue to the cause of the problem?

Anyway, the debug file is attached.

Thanks again for your help.

AttachmentSize
debug_2.txt22.56 KB
 
ewalton

Joined: 2011-08-13
Posts: 20
Posted: Wed, 2011-08-17 09:15

Update: the the debug info did go away after logging back into Gallery

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7892
Posted: Wed, 2011-08-17 12:19

There is no error in that debug.
I just noticed your g2data is in public_html/...
if you are using cpanel, it does not allow for publicly writable directories.
can you move it to /home/crfgor5/g2data_2.3?
just edit the path to it in g2/config.php

after the move perform the permissions command:
chmod -R 0777 /home/crfgor5/g2data_2.3

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
ewalton

Joined: 2011-08-13
Posts: 20
Posted: Wed, 2011-08-17 19:02

I will certainly move the directory if you think it will help, but even now, people are uploading images to one of the albums that does work with no problem.
http://www.crfg.org/g2/main.php?g2_itemId=6915
It is a photo contest, and is deliberately open to the public. Photos were uploaded as recently as yesterday.
It is just serendipitous that this particular album works with no problem. All photos (even resizes) can be viewed.

Here is an example of an album (the one for which I submitted the debug file) that has the problem.
http://www.crfg.org/g2/main.php?g2_itemId=6647
The difference is that this album does not allow public uploads.
Even when I am logged on as admin I cannot see the resized images, but I can see the original (full resolution) images.

Permission is set in both albums for the public to view only resized images.
All albums are of course in the same (g2data_2.3) directory.
Please let me know if you still think I should move the g2data_2.3 directory in view of this additional information.

Thank you very much.

 
ewalton

Joined: 2011-08-13
Posts: 20
Posted: Wed, 2011-08-17 19:45

Ah, I think that I finally found the culprit.
Watermarks!!!
Many albums have watermarks, and for some reason the watermarks apparently were not transferred during the move.
I don't believe that Gallery adds the watermarks to the album (g2data_2.3) folder, and they apparently did not get transferred.
When I checked the watermarks in the admin panel they was also blank icons.
I deleted the watermarks and reloaded them. Deleting the watermarks removed them from all of the albums.
Once the watermarks were deleted the images now appear (although the resizes are now incorrect).
It is now a straightforward (although tedious) task to get the images all to the right size and to re-add the watermarks.
There are a few different size watermarks to match the resolution of the photos, and it took quite long time to add and position those watermarks initially.
In any case, the mystery seems to be solved.
For future reference, should I ever again (heaven forbid) have to move Gallery to another server, are there any other steps that should be taken to preserve the watermarks?

I really appreciate all of the assistance that you gave in helping to resolve this issue. Thank you very much!!!!