[SOLVED] Cannot login to admin panel
buksida
Joined: 2006-10-12
Posts: 4 |
Posted: Wed, 2010-09-22 01:47 |
This is the error message: Quote:
Database Error 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] |
|
Posts: 16504
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
Posts: 4
Here is the output in the popup window - no idea what it means:
And below the error message:
Posts: 8339
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
Posts: 27300
if the clear cache does not work see if you can disable the captcha module.
FAQ: How can I deactivate a module when I am unable to login?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 4
Thanks for the suggestions, tried them both and now get this error message:
I've tried the login.txt option which doesn't work.
Posts: 8339
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
Posts: 4
Thanks for the help, it works now and i can login as Admin again!
Posts: 31
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)
Posts: 8339
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
Posts: 31
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.
Posts: 8339
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
Posts: 31
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.
Posts: 8339
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
Posts: 31
I'm logged into phpMyAdmin and don't see anything like what you are referring to.
Posts: 8339
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
Posts: 31
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.
Posts: 8339
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
Posts: 31
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?
Posts: 31
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
Posts: 8339
that's what gallery is tryint to do... rmdir(/home/mprunty2/public_html/screenshots/g2data/cache/entity/)
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
Posts: 31
Using phpMYAdmin, I notice that the locked user you are referring to is already set to '0'.
Posts: 8339
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
Posts: 31
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'.
Posts: 8339
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
Posts: 31
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.
Posts: 8339
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
Posts: 31
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?
Posts: 8339
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
Posts: 31
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.
Posts: 8339
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
Posts: 8339
ok, I just looked at yours and you are missing the table.
execute this query in phpMyAdmin:
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 31
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));
Posts: 31
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.
Posts: 8339
I would bet its marked as crashed.
try this
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 31
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
Posts: 8339
make sure you have the whole thing, its a direct export from my G2 via phpMyAdmin
donot copy from email.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 31
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&page=Status&token=49238499157ae629a0a700c2a76e6424">Details...</a>)
Posts: 8339
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 31
That worked beautifully. Now g2_FailedLoginsMap now shows in the listing via phpMYAdmin.
Posts: 8339
and you can login?
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 31
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.
Posts: 8339
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