Closed (fixed)
Project:
Drupal core
Version:
6.19
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
8 Sep 2010 at 07:33 UTC
Updated:
11 Jul 2011 at 16:41 UTC
I was working on a multi-feature Drupal site, with many modules installed, and then, just after installing date & calendar, I couldn't access my admin account anymore. I even changed the admin password manually in my db, but it didn't work. I then requested a new password but it kept telling me that the linked had expired. I checked around on the forum but didn't find anything working. Then I did this in my db : UPDATE sessions SET uid =1; and everything went fine... So, the issue seems to be solved for the moment, but I'm still wondering what happened ??? Any suggestion ???
Comments
Comment #1
JamesBecht commentedAccess denied again to the admin account today. But this time UPDATE sessions SET uid =1; did not help ! I'm stuck and can't access my website. Help.
Comment #2
JamesBecht commentedfound a possible solution when I followed this issue : http://drupal.org/node/884458
in sites/default/settings.php I changed my $cookie_domain to :
$cookie_domain = $_SERVER['HTTP_HOST'];
and it seems to work.
what is/was the problem in anyway ?
Comment #3
mdupontCookie was set to the wrong domain, so you were unable to log in (Drupal needs a valid cookie to log you in). Marking as fixed.
Comment #4
zempa commentedHello,
i had the same problem on Drupal 6 and i found that it comes from specifying a node for the "access denied" page.
Actually, the bug occurs only on the admin page http://www.mysite.com/admin.
If you try to log in at the user page http://www.mysite.com/user, it will work.
Then, i've checked the difference between the two forms and i found that the user-login-form in the admin page define the action attribute with the current $_GET['q']. Then if you specify a node called for example "my access denied page" as the "access denied" page, the action attribute will be /my-access-denied-page?q=destination=admin : that's why the authentification fails !
So the solution is to reset the field of the "access denied" page (leave it blank).
If you want to specifiy a page for this "access denied" page, one solution could be, in your template.php theme file :
function mytheme_preprocess_page(&$vars) {
if(!isset($vars['node'])){
$_REQUEST['destination'] = "node/X"; //Where X is the node id of your access denied page.
drupal_goto();
}
}