[SOLVED] Cannot login to admin panel

buksida

Joined: 2006-10-12
Posts: 4
Posted: Wed, 2010-09-22 01:47


Gallery version (not just "2"): 2.x - don't know: can't access admin
PHP version (e.g. 5.1.6): 5.2.9
PHPInfo Link (see FAQ): http://happygallery.org/phpinfo.php
Webserver (e.g. Apache 1.3.33): Apache 2.2.11
Database (e.g. MySql 5.0.32): 5.0.91-community
Activated toolkits (e.g. NetPbm, GD): don't know: can't access admin
Operating system (e.g. Linux): Linux
Browser (e.g. Firefox 2.0): All (FF 3.6/IE 7,8)

This is the error message:

Quote:
Database Error
An error has occurred while interacting with the database.

Back to the Gallery

The site has been running fine for 2 years and all of a sudden we can't access admin.

[EDIT: I have tried all the FAQs, nothing helps]

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2010-09-22 15:23

Put Gallery into debug mode and either take a look at that output or if you can't figure it out, post a link to your gallery and we can see what's causing that problem.
FAQ: How to set/use Gallery in debug mode?

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

 
buksida

Joined: 2006-10-12
Posts: 4
Posted: Thu, 2010-09-23 01:39

Here is the output in the popup window - no idea what it means:

Quote:
Smarty Debug Console
included templates & config files (load time in seconds)
themes/matrix/templates/error.tpl (0.55397) (total)
modules/core/templates/ErrorPage.tpl (0.02102)

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.021020174026489
{$_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)

And below the error message:

Quote:
Debug Output
file_exists(/home/happygal/public_html/gallery/g2data/cache/module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc) file_exists(/home/happygal/public_html/gallery/modules/rewrite/classes/parsers/modrewrite/ModRewriteUrlGenerator.class) getParameter shortUrls for rewrite plugin file_exists(/home/happygal/public_html/gallery/g2data/cache/module/rewrite/0/0/0.inc) getParameter session.lifetime for core plugin file_exists(/home/happygal/public_html/gallery/g2data/cache/module/core/0/0/0.inc) getParameter session.inactivityTimeout for core plugin
--------------------------------------------------------------------------------
(mysqlt): SET NAMES "utf8"
--------------------------------------------------------------------------------
file_exists(/home/happygal/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='a39591ccfc31f9ef99bcb26125cc151f'
--------------------------------------------------------------------------------
controller core.UserLogin, view Loading plugin core Class not defined, trying to include it. file_exists(/home/happygal/public_html/gallery/modules/core/module.inc) core plugin successfully instantiated file_exists(/home/happygal/public_html/gallery/g2data/versions.dat) file(/home/happygal/public_html/gallery/g2data/versions.dat, ) getParameter modrewrite.galleryLocation for rewrite plugin [1285205760] can't guarantee 5 -- extending! file_exists(/home/happygal/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/happygal/public_html/gallery/g2data/cache/module/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc) The version of the core plugin is ok file_exists(/home/happygal/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/happygal/public_html/gallery/g2data/cache/entity/0/0/6.inc) getParameter validation.level for core plugin file_exists(/home/happygal/public_html/gallery/modules/captcha/classes/CaptchaValidationPlugin.inc) getParameter failedAttemptThreshold for captcha plugin file_exists(/home/happygal/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(/home/happygal/public_html/gallery/modules/albumselect/module.inc) albumselect plugin successfully instantiated Loading plugin comment Class not defined, trying to include it. file_exists(/home/happygal/public_html/gallery/modules/comment/module.inc) comment plugin successfully instantiated Loading plugin customfield Class not defined, trying to include it. file_exists(/home/happygal/public_html/gallery/modules/customfield/module.inc) customfield plugin successfully instantiated Loading plugin hidden Class not defined, trying to include it. file_exists(/home/happygal/public_html/gallery/modules/hidden/module.inc) hidden plugin successfully instantiated Loading plugin httpauth Class not defined, trying to include it. file_exists(/home/happygal/public_html/gallery/modules/httpauth/module.inc) httpauth plugin successfully instantiated Loading plugin imageblock Class not defined, trying to include it. file_exists(/home/happygal/public_html/gallery/modules/imageblock/module.inc) imageblock plugin successfully instantiated Loading plugin linkitem Class not defined, trying to include it. file_exists(/home/happygal/public_html/gallery/modules/linkitem/module.inc) linkitem plugin successfully instantiated Loading plugin multilang Class not defined, trying to include it. file_exists(/home/happygal/public_html/gallery/modules/multilang/module.inc) multilang plugin successfully instantiated Loading plugin password Class not defined, trying to include it. file_exists(/home/happygal/public_html/gallery/modules/password/module.inc) password plugin successfully instantiated Loading plugin quotas Class not defined, trying to include it. file_exists(/home/happygal/public_html/gallery/modules/quotas/module.inc) quotas plugin successfully instantiated Loading plugin rating Class not defined, trying to include it. file_exists(/home/happygal/public_html/gallery/modules/rating/module.inc) rating plugin successfully instantiated Loading plugin rewrite Class not defined, trying to include it. file_exists(/home/happygal/public_html/gallery/modules/rewrite/module.inc) rewrite plugin successfully instantiated Loading plugin rss Class not defined, trying to include it. file_exists(/home/happygal/public_html/gallery/modules/rss/module.inc) rss plugin successfully instantiated Loading plugin sizelimit Class not defined, trying to include it. file_exists(/home/happygal/public_html/gallery/modules/sizelimit/module.inc) sizelimit plugin successfully instantiated Loading plugin thumbnail Class not defined, trying to include it. file_exists(/home/happygal/public_html/gallery/modules/thumbnail/module.inc) thumbnail plugin successfully instantiated Loading plugin useralbum Class not defined, trying to include it. file_exists(/home/happygal/public_html/gallery/modules/useralbum/module.inc) useralbum plugin successfully instantiated Loading plugin watermark Class not defined, trying to include it. file_exists(/home/happygal/public_html/gallery/modules/watermark/module.inc) watermark 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(/home/happygal/public_html/gallery/themes/matrix/theme.inc) matrix plugin successfully instantiated Check the version of the matrix plugin file_exists(/home/happygal/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(/home/happygal/public_html/gallery/modules/core/classes/../../../) realpath(/home/happygal/public_html/gallery/) file_exists(/home/happygal/public_html/gallery/g2data/smarty/templates_c/%%3414806733) is_dir(/home/happygal/public_html/gallery/g2data/smarty/templates_c/%%3414806733) file_exists(/home/happygal/public_html/gallery/g2data/smarty/templates_c/%%3414806733) is_writeable(/home/happygal/public_html/gallery/g2data/smarty/templates_c/%%3414806733) file_exists(/home/happygal/public_html/gallery/g2data/smarty/templates_c/%%3414806733/v_12) getParameter modrewrite.galleryLocation for rewrite plugin file_exists(/home/happygal/public_html/gallery/modules/core/classes/../../../lib/javascript/local/BlockToggle.js) file_exists(/home/happygal/public_html/gallery/modules/core/../../themes/matrix/local/theme.css) file_exists(/home/happygal/public_html/gallery/modules/core/classes/../../../themes/matrix/local/theme.css)

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2010-09-23 02:11

try clearing your caches yoursite.com/gallery2/lib/support

and please don't post that much debug into any forum, paste it to a txt file and attach it.

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

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2010-09-23 03:57

if the clear cache does not work see if you can disable the captcha module.

Quote:
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')")

FAQ: How can I deactivate a module when I am unable to login?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
buksida

Joined: 2006-10-12
Posts: 4
Posted: Thu, 2010-09-23 10:00

Thanks for the suggestions, tried them both and now get this error message:

Quote:
Logins to this account are temporarily disabled due to multiple failed login attempts. Wait for access to be restored, or use the recover password page to re-enable this account.

I've tried the login.txt option which doesn't work.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2010-09-23 12:00

after disabling the captcha module did you clear the cache again?

also make sure no one has maliciously messed with your installation
FAQ: How can I make sure that my installation files are all intact?

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

 
buksida

Joined: 2006-10-12
Posts: 4
Posted: Thu, 2010-09-23 13:03

Thanks for the help, it works now and i can login as Admin again!

 
mprunty

Joined: 2007-08-16
Posts: 31
Posted: Thu, 2010-10-21 00:13

I'm experiencing the same issue that buksida was going through. I have posted my information below for anyone who can help me out in this situation. I have tried clearing my cache using the provided steps in this thread and I still don't have access. I tried the debug route, however I don't understand the text that comes up so I'm pretty much stuck at the current moment. I don't have captcha installed, so I know that's not an issue at all.

Gallery version (not just "2"): 2.3.1
PHP version (e.g. 5.1.6): 5.2.14
PHPInfo Link (see FAQ): http://gamingevolution.info/screenshots/lib/support/index.php?phpinfo
Webserver (e.g. Apache 1.3.33): Apache 2.2.16
Database (e.g. MySql 5.0.32): 5.1.50
Activated toolkits (e.g. NetPbm, GD): don't know: can't access admin
Operating system (e.g. Linux): Linux CentOS
Browser (e.g. Firefox 2.0): All (FF 3.6/IE 7,8)

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2010-10-21 00:20
Quote:
I don't understand the text that comes up

Well, we may... copy it to a txt file and attach it here.
You have not provided nearly enough info. Less is not better in this situation.

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

 
mprunty

Joined: 2007-08-16
Posts: 31
Posted: Thu, 2010-10-21 00:46

I have attached a text document with the debut information that was provided when I put my gallery in debug mode. I hope this information helps.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2010-10-21 01:03

No, I really would like to know what it has to say when it's not displaying your admin.

Also was your gallery admin working previously?

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

 
mprunty

Joined: 2007-08-16
Posts: 31
Posted: Thu, 2010-10-21 01:11

If I try to log into my database for my website, I get the following message:

Database Error
An error has occurred while interacting with the database.

Back to the Gallery

In regards to being able to access the gallery, I've had access without any problems for more than three years. It was working perfectly fine yesterday and when I logged in this morning, I no longer had access and was given the error message posted above. If you go to http://gamingevolution.info/screenshots/main.php the gallery shows perfectly fine. I just can't gain access to upload new screenshots to the database, let alone run maintenance.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2010-10-21 01:18

If you have access to a tool like phpMyAdmin or similar, look for crashed or "in need of repair" tables.

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

 
mprunty

Joined: 2007-08-16
Posts: 31
Posted: Thu, 2010-10-21 01:25
suprsidr wrote:
If you have access to a tool like phpMyAdmin or similar, look for crashed or "in need of repair" tables.

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

I'm logged into phpMyAdmin and don't see anything like what you are referring to.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2010-10-21 01:32

Ok, try running through the upgrader. Pay special attention during system checks(step2).

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

 
mprunty

Joined: 2007-08-16
Posts: 31
Posted: Thu, 2010-10-21 01:47

Going through the upgrader, everything checked out with 'Success' in Step 2 of the process. However, once I got to step six, things changed. [i]I got the following error message across the top of the screen:

Warning: rmdir(/home/mprunty2/public_html/screenshots/g2data/cache/entity/) [function.rmdir]: Directory not empty in /home/mprunty2/public_html/screenshots/modules/core/classes/GalleryPlatform.class on line 516

The whole process checked out fine with the exception of said error message.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2010-10-21 01:57

Well, that's a filesystem error, not a DB error.
Can you remove that directory via ftp or shell?

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

 
mprunty

Joined: 2007-08-16
Posts: 31
Posted: Thu, 2010-10-21 02:08

Removing the directory isn't a problem at all. Should I be removing just the directory where that file is kept or just the file itself?

 
mprunty

Joined: 2007-08-16
Posts: 31
Posted: Thu, 2010-10-21 02:12

I forgot to post this bit of information earlier. When I was under debug mode when trying to collect the information to include within the text document, I forgot to add the following:

Error (ERROR_STORAGE_FAILURE)

* in modules/core/classes/GalleryStorage.class at line 642 (GalleryCoreApi::error)
* in modules/core/classes/GalleryCoreApi.class at line 2912 (GalleryStorage::getMapEntry)
* in modules/core/classes/helpers/GalleryUserHelper_medium.class at line 425 (GalleryCoreApi::getMapEntry)
* in modules/core/classes/GalleryCoreApi.class at line 3182 (GalleryUserHelper_medium::isDisabledUsername)
* in modules/core/UserLogin.inc at line 74 (GalleryCoreApi::isDisabledUsername)
* in main.php at line 250 (UserLoginController::handleRequest)
* in main.php at line 104
* in main.php at line 88

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2010-10-21 03:54
Quote:
Should I be removing just the directory where that file is kept or just the file itself?

that's what gallery is tryint to do... rmdir(/home/mprunty2/public_html/screenshots/g2data/cache/entity/)

Quote:
GalleryCoreApi::isDisabledUsername

This is an error I have not seen before, and I know Gallery2.
you'll have to wade through the g2_User table looking for your locked user. and set that back to 0

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

 
mprunty

Joined: 2007-08-16
Posts: 31
Posted: Thu, 2010-10-21 04:18

Using phpMYAdmin, I notice that the locked user you are referring to is already set to '0'.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2010-10-21 04:33
Quote:
I notice that the locked user you are referring to is already set to '0'.

I'm not referring to any user, your error message fragments are.
Also don't forget this is your issue not mine.

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

 
mprunty

Joined: 2007-08-16
Posts: 31
Posted: Thu, 2010-10-21 05:23

I'm not attacking you in any way. I thank you for all your help you have given me up to this point. All I meant by my last post is that after looking through the table you asked me to, all the username's listed had a set value of '0'.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2010-10-21 11:45

Your errors are all over the place.
make sure g2data is recursively writable chmod -R 0777 /path/to/g2data
also make sure the DB info is correct.
check your server's error logs for further clues.

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

 
mprunty

Joined: 2007-08-16
Posts: 31
Posted: Thu, 2010-10-21 20:48

Thank you for continuing to help me rectify this problem. It's as if all these problems have occurred at once. I have changed the g2Data directory path from 744 to 777 as you stated. I also looked into the error log as you requested, particularly in regards to the Image gallery and came across for the following errors dating back to 10-20-2010 which seem to repeat. I have copied them into a text document.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2010-10-21 21:17

well, none of those php notices are fatal, if you'd like them to stop, uninstall the rss module.
But we need to get you back into your admin first.

I was just looking through GalleryCoreApi.class and it seems the isDisabledUsername function checks the g2_FailedLoginsMap for multiple entries for that user.
clear all entries from that table in your DB.

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

 
mprunty

Joined: 2007-08-16
Posts: 31
Posted: Thu, 2010-10-21 22:47

Using phpMYAdmin I notice that there isn't a 'g2_FailedLoginsMap' listed for my gallery. I have a 'failed_auths' listed. Would that be the same thing you are refering to?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2010-10-21 23:46

No, you looking at a G2 database? Gallery2 coding standards would not allow for failed_auths, it would be g2_FailedAuthentications (but reality g2_FailedLoginsMap)

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

 
mprunty

Joined: 2007-08-16
Posts: 31
Posted: Fri, 2010-10-22 00:00

I'm definitely working with a G2 (Gallery 2) database and there is no listing of g2_FailedAuthentications (but reality g2_FailedLoginsMap) when viewing my database through phpMyAdmin. The only 'g2_' listings that are included in my database have been listed in the attached text document.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2010-10-22 00:19

ok, tell me what DB table is referenced by gallery2/modules/core/classes/helpers/GalleryUserHelper_medium.class
in function isDisabledUsername

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

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2010-10-22 00:25

ok, I just looked at yours and you are missing the table.
execute this query in phpMyAdmin:

CREATE TABLE `g2_FailedLoginsMap` (
  `g_userName` varchar(32) NOT NULL,
  `g_count` int(11) NOT NULL,
  `g_lastAttempt` int(11) NOT NULL,
  PRIMARY KEY  (`g_userName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

 
mprunty

Joined: 2007-08-16
Posts: 31
Posted: Fri, 2010-10-22 00:29

The following was taken from the GalleryUserHelper_medium.class:

/**
* @see GalleryCoreApi::isDisabledUsername
*/
function isDisabledUsername($userName) {
global $gallery;

list ($ret, $searchResults) = GalleryCoreApi::getMapEntry(
'FailedLoginsMap',
array('count', 'lastAttempt'),
array('userName' => $userName));

 
mprunty

Joined: 2007-08-16
Posts: 31
Posted: Fri, 2010-10-22 00:32
suprsidr wrote:
ok, I just looked at yours and you are missing the table.
execute this query in phpMyAdmin:

CREATE TABLE `g2_FailedLoginsMap` (
  `g_userName` varchar(32) NOT NULL,
  `g_count` int(11) NOT NULL,
  `g_lastAttempt` int(11) NOT NULL,
  PRIMARY KEY  (`g_userName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

The weird thing is when I followed your instructions it says the table 'g2_FailedLoginsMap' already exists, though it's not listed when you view the gallery through phpMYAdmin.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2010-10-22 00:37

I would bet its marked as crashed.
try this


DROP TABLE IF EXISTS `g2_FailedLoginsMap`;
CREATE TABLE `g2_FailedLoginsMap` (
  `g_userName` varchar(32) NOT NULL,
  `g_count` int(11) NOT NULL,
  `g_lastAttempt` int(11) NOT NULL,
  PRIMARY KEY  (`g_userName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

 
mprunty

Joined: 2007-08-16
Posts: 31
Posted: Fri, 2010-10-22 00:40

The new query brought up an error message, which I posted below:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE TABLE `g2_FailedLoginsMap` ( `g_userName` varchar(32) NOT NULL, `g_' at line 2

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2010-10-22 00:44

make sure you have the whole thing, its a direct export from my G2 via phpMyAdmin
donot copy from email.

DROP TABLE IF EXISTS `g2_FailedLoginsMap`;
CREATE TABLE `g2_FailedLoginsMap` (
  `g_userName` varchar(32) NOT NULL,
  `g_count` int(11) NOT NULL,
  `g_lastAttempt` int(11) NOT NULL,
  PRIMARY KEY  (`g_userName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

 
mprunty

Joined: 2007-08-16
Posts: 31
Posted: Fri, 2010-10-22 00:49

After making sure I entered the information correctly, this is the follow response I get:

#1005 - Can't create table 'mprunty2_gllr1.g2_FailedLoginsMap' (errno: -1) (<a href="server_engines.php?engine=InnoDB&amp;page=Status&amp;token=49238499157ae629a0a700c2a76e6424">Details...</a>)

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2010-10-22 00:59
DROP TABLE IF EXISTS `g2_FailedLoginsMap`;
CREATE TABLE `g2_FailedLoginsMap` (
  `g_userName` varchar(32) NOT NULL,
  `g_count` int(11) NOT NULL,
  `g_lastAttempt` int(11) NOT NULL,
  PRIMARY KEY  (`g_userName`)
) TYPE=MyISAM;

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

 
mprunty

Joined: 2007-08-16
Posts: 31
Posted: Fri, 2010-10-22 01:02

That worked beautifully. Now g2_FailedLoginsMap now shows in the listing via phpMYAdmin.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2010-10-22 01:14
 
mprunty

Joined: 2007-08-16
Posts: 31
Posted: Fri, 2010-10-22 01:23

Yes I am able to log into my gallery now. Thank you for all your help. I've also removed the RSS module so I will no longer receive that error message in my log. I did, however, come across a new error screen whenever I try to create a new album to upload screenshots into. I snapped a screenshot of the screen and have attached it to this post.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2010-10-22 01:34

please start a new thread for the new error, its not related to the current topic.

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