An error has occurred while interacting with the database.
The exact nature of database errors is not captured unless Gallery debug mode is enabled in config.php. Before seeking support for this error please enable buffered debug output and retry the operation. Look near the bottom of the lengthy debug output to find error details.
Back to the Gallery
Error Detail -
Error (ERROR_STORAGE_FAILURE)
in modules/core/classes/GalleryStorage.class at line 476 (GalleryCoreApi::error)
in modules/core/classes/Gallery.class at line 223 (GalleryStorage::search)
in modules/core/classes/helpers/GalleryEntityHelper_medium.class at line 159 (Gallery::search)
in modules/core/classes/helpers/GalleryEntityHelper_medium.class at line 73 (GalleryEntityHelper_medium::fetchEntitiesLinkedTo)
in modules/core/classes/GalleryCoreApi.class at line 2395 (GalleryEntityHelper_medium::deleteEntityById)
in modules/core/ItemDelete.inc at line 86 (GalleryCoreApi::deleteEntityById)
in main.php at line 199 (ItemDeleteController::handleRequest)
in main.php at line 87
in main.php at line 80
System Information
Gallery version 2.1.2
PHP version 5.2.6-1+lenny3 apache2handler
Webserver Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny3 with Suhosin-Patch mod_perl/2.0.4 Perl/v5.10.0
Database mysql 5.0.51a-24+lenny1
Toolkits SquareThumb, NetPBM
Operating system Linux titan 2.6.26-2-686 #1 SMP Sun Jun 21 04:57:38 UTC 2009 i686
Browser Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; InfoPath.2; .NET CLR 3.0.30729)
Debug Output
file_exists(/usr/share/gallery2/modules/core/classes/helpers/../../../../config.php) file_exists(/usr/share/gallery2/modules/core/classes/helpers/../../../../plugins/index.modules) file_exists(/home/stefan/gallery2pics/cache/module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc) Unimplemented: GalleryUrlGenerator getParameter session.lifetime for core plugin file_exists(/home/stefan/gallery2pics/cache/module/core/0/0/0.inc) getParameter session.inactivityTimeout for core plugin
--------------------------------------------------------------------------------
(mysql): SET NAMES "utf8"
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysql): SELECT g2_SessionMap.g_id, g2_SessionMap.g_userId, g2_SessionMap.g_remoteIdentifier,g2_SessionMap.g_creationTimestamp, g2_SessionMap.g_modificationTimestamp, g2_SessionMap.g_data FROM g2_SessionMap WHERE g2_SessionMap.g_id = '1dddfafda86c0aa17bad438e3f1034ed'
--------------------------------------------------------------------------------
Warning: Unable to select locale en_GB controller core.ItemDelete, view Loading plugin core Class not defined, trying to include it. file_exists(/usr/share/gallery2/modules/core/classes/helpers/../../../../modules/core/module.inc) core plugin successfully instantiated file_exists(/home/stefan/gallery2pics/versions.dat) file(/home/stefan/gallery2pics/versions.dat, ) [1259003546] can't guarantee 5 -- extending! file_exists(/home/stefan/gallery2pics/cache/entity/0/0/6.inc) Loading plugin core core plugin successfully instantiated Check the version of the core plugin file_exists(/home/stefan/gallery2pics/cache/module/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc) The version of the core plugin is ok file_exists(/usr/share/gallery2/modules/core/classes/helpers/../../../../modules/core/ItemDelete.inc) getParameter id.rootAlbum for core plugin
--------------------------------------------------------------------------------
(mysql): SELECT g2_Group.g_id, g2_Group.g_groupName FROM g2_UserGroupMap, g2_Group WHERE g2_Group.g_id = g2_UserGroupMap.g_groupId AND g2_UserGroupMap.g_userId = 6 ORDER BY g2_Group.g_groupName LIMIT 18446744073709551615
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysql): SELECT g2_AccessSubscriberMap.g_itemId, BIT_OR(g2_AccessMap.g_permission) FROM g2_AccessMap, g2_AccessSubscriberMap WHERE g2_AccessSubscriberMap.g_itemId IN (153956) AND g2_AccessSubscriberMap.g_accessListId = g2_AccessMap.g_accessListId AND g2_AccessMap.g_userOrGroupId IN (6,4,2,3) GROUP BY g2_AccessSubscriberMap.g_itemId
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysql): SELECT g2_PermissionSetMap.g_module, g2_PermissionSetMap.g_permission, g2_PermissionSetMap.g_description, g2_PermissionSetMap.g_bits, g2_PermissionSetMap.g_flags FROM g2_PermissionSetMap
--------------------------------------------------------------------------------
realpath(/usr/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_core -> /usr/share/gallery2/modules/core/locale realpath(/usr/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_cart -> /usr/share/gallery2/modules/cart/locale realpath(/usr/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_comment -> /usr/share/gallery2/modules/comment/locale realpath(/usr/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_fotokasten -> /usr/share/gallery2/modules/fotokasten/locale realpath(/usr/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_photoaccess -> /usr/share/gallery2/modules/photoaccess/locale realpath(/usr/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_rating -> /usr/share/gallery2/modules/rating/locale realpath(/usr/share/gallery2/modules/core/classes/../../..) Binding text domain: modules_shutterfly -> /usr/share/gallery2/modules/shutterfly/locale getParameter lock.system for core plugin fopen(/home/stefan/gallery2pics/locks/1/5/153956, wb+, 0) flock(Resource id #54, 6, ) file_exists(/home/stefan/gallery2pics/cache/entity/1/5/153956.inc)
--------------------------------------------------------------------------------
(mysql): SELECT g2_ItemAttributesMap.g_itemId, g2_ItemAttributesMap.g_parentSequence FROM g2_ChildEntity, g2_ItemAttributesMap WHERE g2_ChildEntity.g_id = 153956 AND g2_ChildEntity.g_parentId = g2_ItemAttributesMap.g_itemId
--------------------------------------------------------------------------------
fopen(/home/stefan/gallery2pics/locks/0/7/7, wb+, 0) fopen(/home/stefan/gallery2pics/locks/1/7/17033, wb+, 0) flock(Resource id #61, 5, ) flock(Resource id #62, 5, 0) mysql error: [144: Table './gallery2/g2_Entity' is marked as crashed and last (automatic?) repair failed] in EXECUTE(" SELECT g2_Entity.g_id FROM g2_Entity WHERE g2_Entity.g_linkId = 153956 ORDER BY g2_Entity.g_id ASC ")
--------------------------------------------------------------------------------
(mysql): SELECT g2_Entity.g_id FROM g2_Entity WHERE g2_Entity.g_linkId = 153956 ORDER BY g2_Entity.g_id ASC
--------------------------------------------------------------------------------
144: Table './gallery2/g2_Entity' is marked as crashed and last (automatic?) repair failed
ADOConnection._Execute(
SELECT
g2_Entity.g_id
FROM
g2_Entity
WHERE
g2_Entity.g_linkId = 153956
ORDER BY
g2_Entity.g_id ASC
) % line 836, file: adodb.inc.php
ADOConnection.Execute(
SELECT
g2_Entity.g_id
FROM
g2_Entity
WHERE
g2_Entity.g_linkId = ?
ORDER BY
g2_Entity.g_id ASC
, Array[1]) % line 469, file: GalleryStorage.class
GalleryStorage.search(
SELECT
[GalleryEntity::id]
FROM
[GalleryEntity]
WHERE
[GalleryEntity::linkId] = ?
ORDER BY
[GalleryEntity::id] ..., Array[1], Array[0]) % line 223, file: Gallery.class
Gallery.search(
SELECT
[GalleryEntity::id]
FROM
[GalleryEntity]
WHERE
[GalleryEntity::linkId] = ?
ORDER BY
[GalleryEntity::id] ..., Array[1]) %
line 159, file: GalleryEntityHelper_medium.class
GalleryEntityHelper_medium.fetchEntitiesLinkedTo(153956) % line 73, file: GalleryEntityHelper_medium.class
fclose(Resource id #54) file_exists(/home/stefan/gallery2pics/locks/1/5/153956) unlink(/home/stefan/gallery2pics/locks/1/5/153956) fclose(Resource id #61) file_exists(/home/stefan/gallery2pics/locks/0/7/7) unlink(/home/stefan/gallery2pics/locks/0/7/7) fclose(Resource id #62) file_exists(/home/stefan/gallery2pics/locks/1/7/17033) unlink(/home/stefan/gallery2pics/locks/1/7/17033) getParameter default.theme for core plugin Loading plugin PGtheme Class not defined, trying to include it. file_exists(/usr/share/gallery2/modules/core/classes/helpers/../../../../config.php) file_exists(/usr/share/gallery2/modules/core/classes/helpers/../../../../plugins/index.themes) file_exists(/usr/share/gallery2/modules/core/classes/helpers/../../../../themes/PGtheme/theme.inc) PGtheme plugin successfully instantiated Check the version of the PGtheme plugin file_exists(/home/stefan/gallery2pics/cache/theme/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc) The version of the PGtheme plugin is ok Loading plugin core core plugin successfully instantiated Check the version of the core plugin The version of the core plugin is ok file_exists(/usr/share/gallery2/modules/core/classes/helpers/../../../../modules/core/ErrorPage.inc) getParameter id.adminGroup for core plugin
--------------------------------------------------------------------------------
(mysql): SELECT g2_UserGroupMap.g_userId FROM g2_UserGroupMap WHERE g2_UserGroupMap.g_userId = 6 AND g2_UserGroupMap.g_groupId = 3 LIMIT 1
--------------------------------------------------------------------------------
realpath(/usr/share/gallery2/modules/core/classes/../../../)
--------------------------------------------------------------------------------
(mysql): SELECT g2_TkOperatnMimeTypeMap.g_mimeType, g2_TkOperatnMimeTypeMap.g_toolkitId FROM g2_TkOperatnMimeTypeMap WHERE g2_TkOperatnMimeTypeMap.g_operationName = 'thumbnail' ORDER BY g2_TkOperatnMimeTypeMap.g_mimeType ASC, g2_TkOperatnMimeTypeMap.g_priority ASC
--------------------------------------------------------------------------------
file_exists(/home/stefan/gallery2pics/smarty/templates_c/%%626616196) is_dir(/home/stefan/gallery2pics/smarty/templates_c/%%626616196) file_exists(/home/stefan/gallery2pics/smarty/templates_c/%%626616196) is_writeable(/home/stefan/gallery2pics/smarty/templates_c/%%626616196) file_exists(/home/stefan/gallery2pics/smarty/templates_c/%%626616196/v_9) file_exists(/usr/share/gallery2/modules/core/classes/../../../lib/javascript/local/BlockToggle.js) realpath(/usr/share/gallery2/modules/core/classes/../../..) Binding text domain: themes_PGtheme -> /usr/share/gallery2/themes/PGtheme/locale file_exists(/usr/share/gallery2/modules/core/../../themes/PGtheme/local/theme.css) file_exists(/usr/share/gallery2/modules/core/classes/../../../themes/PGtheme/local/theme.css)
Posts: 16503
You'll need to repair that table. That can be repaired under phpMyAdmin pretty easily, though I can't remember the exact steps as I'd have to looked that up.
Version 2.1.2? That's really old and you should look into upgrading to the latest version of G2 as there have been many security and bug fixes as well as enhancements.
FAQ: How to upgrade Gallery2?
It also appears you're using database locking, if you're running on Linux I'd strongly suggest you switch that to file locking, it's going to be faster. Go to Site Admin > General (first page you get) to change that setting.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 5
Thanks nivekiam, that solved the problem. Yes I should upgrade Gallery, you are right about that.
The locking scheme is "File".
Now I have another problem if you might know what it is :
http://gallery.menalto.com/node/92662
Cheers,
Stefan