"An error has occurred while interacting with the database" at login

F for Fragging

Joined: 2006-07-17
Posts: 6
Posted: Tue, 2008-09-02 08:08

My Gallery 2.2.3 installation used to work fine – the pages are accessible and it displays my photos and I could login without problems – until I tried to log in today. It gives me the error message "An error has occurred while interacting with the database". First I tried upgrading to 2.2.5 to see if the problem might go away (file integrity was OK during the upgrade), but it didn't. I fed the error message to Google, which gave me two topics on this forum, which didn't give a solution either. I found this in the Gallery 2 FAQ, but changing $storeConfig['type'] = 'mysql'; to $storeConfig['type'] = 'mysqlt'; didn't change anything either. I also tried giving a repair command for all of Gallery 2's table's in PHPMyAdmin, but that didn't help.

The phpinfo file is here. I can't copy system information here, because I can't login. MySQL version is 5.0.22, no toolkits activated. This is the link to my Gallery installation. Debug output is as follows:

file_exists(/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/g2data/cache/module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc) Unimplemented: GalleryUrlGenerator getParameter session.lifetime for core plugin file_exists(/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/g2data/cache/module/core/0/0/0.inc) getParameter session.inactivityTimeout for core plugin (mysqlt): SET NAMES "utf8" file_exists(/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/g2data/cache/module/_all/0/0/GalleryStorage_describeMap.inc) (mysqlt): SELECT g_userId, g_remoteIdentifier, g_creationTimestamp, g_modificationTimestamp, g_data FROM g2_SessionMap WHERE g_id='33c97f3c3a5b7af8be77f8d045881bed' controller core.UserLogin, view Loading plugin core Class not defined, trying to include it. file_exists(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/modules/core/module.inc) core plugin successfully instantiated file_exists(/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/g2data/versions.dat) file(/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/g2data/versions.dat, ) [1220341156] can't guarantee 5 -- extending! file_exists(/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/g2data/cache/entity/0/0/5.inc) Loading plugin core core plugin successfully instantiated Check the version of the core plugin file_exists(/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/g2data/cache/module/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc) The version of the core plugin is ok file_exists(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/modules/core/UserLogin.inc) (mysqlt): SELECT g_count, g_lastAttempt FROM g2_FailedLoginsMap WHERE g_userName='Admin' (mysqlt): SELECT g2_User.g_id FROM g2_User WHERE g2_User.g_userName = 'Admin' file_exists(/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/g2data/cache/entity/0/0/6.inc) getParameter validation.level for core plugin file_exists(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/modules/captcha/classes/CaptchaValidationPlugin.inc) getParameter failedAttemptThreshold for captcha plugin file_exists(/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/g2data/cache/module/captcha/0/0/0.inc) getParameter failCount-core.UserLogin.Admin for captcha plugin setParameter failCount-core.UserLogin.Admin for captcha plugin (mysqlt): SET AUTOCOMMIT=0 (mysqlt): BEGIN mysqlt error: [1062: Duplicate entry 'module-captcha-0-failCount-core.UserLogin.Admin' for key 1] in EXECUTE("INSERT INTO g2_PluginParameterMap (g_pluginType, g_pluginId, g_itemId, g_parameterName, g_parameterValue) VALUES ('module','captcha',0,'failCount-core.UserLogin.Admin','1')") (mysqlt): INSERT INTO g2_PluginParameterMap (g_pluginType, g_pluginId, g_itemId, g_parameterName, g_parameterValue) VALUES ('module','captcha',0,'failCount-core.UserLogin.Admin','1') 1062: Duplicate entry 'module-captcha-0-failCount-core.UserLogin.Admin' for key 1

ADOConnection._Execute(INSERT INTO g2_PluginParameterMap
(g_pluginType, g_pluginId, g_itemId, g_parameterName, g_parameterValue)
VALUES ('module','capt...) % line 870,
file: adodb.inc.php

ADOConnection.Execute(INSERT INTO
g2_PluginParameterMap (g_pluginType, g_pluginId, g_itemId, g_parameterName,
g_parameterValue) VALUES (?,?,?,?,?), Array[5]) % line 998, file: GalleryStorageExtras.class
GalleryStorageExtras.addMapEntry(GalleryPluginParameterMap,
Array[5]) % line 505, file: GalleryStorage.class
GalleryStorage.addMapEntry(GalleryPluginParameterMap,
Array[5]) % line 2841, file: GalleryCoreApi.class
GalleryCoreApi.addMapEntry(GalleryPluginParameterMap,
Array[5]) % line 363, file: GalleryPluginHelper_medium.class

Loading plugin albumselect Class not defined, trying to include it. file_exists(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/modules/albumselect/module.inc) albumselect plugin successfully instantiated Loading plugin comment Class not defined, trying to include it. file_exists(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/modules/comment/module.inc) comment plugin successfully instantiated Loading plugin customfield Class not defined, trying to include it. file_exists(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/modules/customfield/module.inc) customfield plugin successfully instantiated Loading plugin hidden Class not defined, trying to include it. file_exists(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/modules/hidden/module.inc) hidden plugin successfully instantiated Loading plugin httpauth Class not defined, trying to include it. file_exists(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/modules/httpauth/module.inc) httpauth plugin successfully instantiated Loading plugin imageblock Class not defined, trying to include it. file_exists(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/modules/imageblock/module.inc) imageblock plugin successfully instantiated Loading plugin linkitem Class not defined, trying to include it. file_exists(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/modules/linkitem/module.inc) linkitem plugin successfully instantiated Loading plugin multilang Class not defined, trying to include it. file_exists(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/modules/multilang/module.inc) multilang plugin successfully instantiated Loading plugin password Class not defined, trying to include it. file_exists(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/modules/password/module.inc) password plugin successfully instantiated Loading plugin permalinks Class not defined, trying to include it. file_exists(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/modules/permalinks/module.inc) permalinks plugin successfully instantiated Loading plugin rating Class not defined, trying to include it. file_exists(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/modules/rating/module.inc) rating plugin successfully instantiated Loading plugin rss Class not defined, trying to include it. file_exists(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/modules/rss/module.inc) rss plugin successfully instantiated Loading plugin sizelimit Class not defined, trying to include it. file_exists(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/modules/sizelimit/module.inc) sizelimit plugin successfully instantiated Loading plugin thumbnail Class not defined, trying to include it. file_exists(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/modules/thumbnail/module.inc) thumbnail plugin successfully instantiated Loading plugin useralbum Class not defined, trying to include it. file_exists(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/modules/useralbum/module.inc) useralbum plugin successfully instantiated Loading plugin watermark Class not defined, trying to include it. file_exists(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/modules/watermark/module.inc) watermark plugin successfully instantiated Loading plugin webdav Class not defined, trying to include it. file_exists(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/modules/webdav/module.inc) webdav plugin successfully instantiated Loading plugin core core plugin successfully instantiated getParameter default.theme for core plugin Loading plugin matrix Class not defined, trying to include it. file_exists(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/themes/matrix/theme.inc) matrix plugin successfully instantiated Check the version of the matrix plugin file_exists(/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/g2data/cache/theme/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc) The version of the matrix 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 getParameter id.adminGroup for core plugin (mysqlt): SELECT g_userId FROM g2_UserGroupMap WHERE g_userId=5 AND g_groupId=3 LIMIT 1 realpath(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/modules/core/classes/../../../) realpath(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/) file_exists(/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/g2data/smarty/templates_c/%%3208335256) is_dir(/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/g2data/smarty/templates_c/%%3208335256) file_exists(/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/g2data/smarty/templates_c/%%3208335256) is_writeable(/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/g2data/smarty/templates_c/%%3208335256) file_exists(/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/g2data/smarty/templates_c/%%3208335256/v_12) file_exists(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/modules/core/classes/../../../lib/javascript/local/BlockToggle.js) file_exists(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/modules/core/../../themes/matrix/local/theme.css) file_exists(/usr/home/deb7345/domains/alexandervanloon.nl/public_html/gallery/modules/core/classes/../../../themes/matrix/local/theme.css)

And here is some more output from the Smarty debug console popup:

Smarty Debug Console
included templates & config files (load time in seconds)
themes/matrix/templates/error.tpl (0.07938) (total)
modules/core/templates/ErrorPage.tpl (0.01030)
assigned template variables
{$ErrorPage} Array (3)
isAdmin => false
stackTrace => "Error (ERROR_STORAGE_FAILURE)<ul><li..."
code => Array (1)
storageFailure => true
{$SCRIPT_NAME} "/gallery/main.php"
{$_debug_config_keys} Array (2)
0 => "files"
1 => "vars"
{$_debug_config_vals} Array (2)
0 => Array (0)
1 => Array (0)
{$_debug_keys} Array (5)
0 => "ErrorPage"
1 => "SCRIPT_NAME"
2 => "head"
3 => "l10Domain"
4 => "theme"
{$_debug_tpls} Array (2)
0 => Array (3)
type => "template"
filename => "themes/matrix/templates/error.tpl"
depth => 0
1 => Array (4)
type => "template"
filename => "modules/core/templates/ErrorPage.tpl"
depth => 1
exec_time => 0.0102980136871
{$_debug_vals} Array (5)
0 => Array (3)
isAdmin => false
stackTrace => "Error (ERROR_STORAGE_FAILURE)<ul><li..."
code => Array (1)
storageFailure => true
1 => "/gallery/main.php"
2 => Array (3)
tpl => Array (0)
style => Array (0)
javascript => Array (1)
0 => "lib/javascript/BlockToggle.js"
3 => "themes_matrix"
4 => Array (1)
errorTemplate => "modules/core/templates/ErrorPage.tpl"
{$debug_output} "<!DOCTYPE html PUBLIC "-//W3C//DTD XH..."
{$head} Array (3)
tpl => Array (0)
style => Array (0)
javascript => Array (1)
0 => "lib/javascript/BlockToggle.js"
{$l10Domain} "themes_matrix"
{$theme} Array (1)
errorTemplate => "modules/core/templates/ErrorPage.tpl"
assigned config file variables (outer template scope)
{#files#} Array (0)
{#vars#} Array (0)

Thank you very much in advance for any help.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2008-09-02 18:58

First see if you can increase the memory limit to at least 24MB

FAQ: PHP memory_limit - Why do I get the error Allowed memory size of Xxx bytes exhausted?

I see this error too in what you posted, so that might help:
FAQ: I get ERROR_STORAGE_FAILURE when adding new photos or creating albums, what should I do?

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
F for Fragging

Joined: 2006-07-17
Posts: 6
Posted: Wed, 2008-09-03 11:23

Thank you for your comment. I tried the fix for the ERROR_STORAGE_FAILURE message, but it didn't help. I'm getting tired of Gallery and I think I'm going to give up on it, and use WordPress' built-in functionality for uploading photos. Gallery seems to need to much work to get it working right, and I want something which just works. Thank you very much for help though.