[development] Force admin login
Mark Noble
mark-d-noble at comcast.net
Wed Feb 24 14:27:55 UTC 2010
It's possible that it is a time zone issue / session length issue. We
were having a problem on another (non-Drupal site) where the user would
be logged out immediately or in a very short time. It turned out that
their timezone settings were incorrect which caused the cookie to expire
immediately rather than after our one hour default session length.
Fixing the timezone worked as did increasing the default session length.
Regards,
Mark Noble
On 2/24/2010 5:29 AM, Tomáš Fülöpp (vacilando.org) wrote:
> Hi,
>
> Thanks for the quick comments. Quick replies:
>
> * It may be a cookie problem, but only in ways I am not
> understanding. It is not the case of blocked cookies in browser.
> After all, many other Drupal sites, same version, work.
> * User table record 0 (anon) is intact, so is record 1 (admin).
> * Setting cookie domain with www - tried, but no effect. After
> all, it's been working for more than a year without www.
> * Corrupt session table? I don't think so -- as I said, I
> truncated it. Also ran analysis and repair on it, and on all
> other tables as well, in fact.
>
> Now, there is _some_ progress. I have set the site to maintenance mode
> by setting the "site_offline" variable.
> SURPRISE - I am not being kicked out of the session! Tried all sorts
> of things - access rebuild, cache clearing, switching off all but bare
> necessary modules, opening and saving permissions page and the admin
> user account, etc., logical and illogical things.
>
> Still, however, when I set the site out of the maintenance mode, it
> kicks me out of the session on second or third click. Sometimes more
> clicks. I think I went up to 5.
>
> I wonder why should it work in maintenance mode but not without it?
> Cookies seem to be OK, right? Session table as well. It must be
> something else.. but what?
> _This is the crucial question_: What is special about the maintenance
> mode that could be causing this difference? This should narrow down
> the possible causes.
>
> Thanks for any further ideas...
>
> Tomáš
>
> PS Btw, I've also installed the dev version of D6 (because of the menu
> router problem, which I was experiencing in D6.15 and I suspected that
> could be a problem), but it did not help.
>
>
>
>
>
>
> On Wed, Feb 24, 2010 at 04:31, Don <donald at fane.com
> <mailto:donald at fane.com>> wrote:
>
> I've seen a corrupt sessions MySQL table cause problems too.
>
> -Don-
>
>
> On 2/23/2010 9:57 PM, Randy Fay wrote:
>> Since this *really* sounds just like the "cookies not enabled in
>> browser" situation, I just wanted to mention something I'm sure
>> you already tried, which is accessing it from a different browser
>> or computer.
>>
>> It's trivial to make all drupal logins stop working: You just
>> turn off cookies in the browser, and it works just like you're
>> describing.
>>
>> -Randy
>>
>> On Tue, Feb 23, 2010 at 5:30 PM, larry at garfieldtech.com
>> <mailto:larry at garfieldtech.com> <larry at garfieldtech.com
>> <mailto:larry at garfieldtech.com>> wrote:
>>
>> You can always edit the database directly.
>>
>> It sounds like a cookie problem, though. Try setting the
>> cookie domain explicitly in your settings.php file to just
>> example.com <http://example.com> (not www.example.com
>> <http://www.example.com>, or whatever).
>>
>> Also, check to make sure that uid 0 is still intact in the
>> database. That's another common source of weirdness, in my
>> experience.
>>
>> --Larry Garfield
>>
>>
>> Tomáš Fülöpp (vacilando.org <http://vacilando.org>) wrote:
>>
>> Hi,
>>
>> Is there a backdoor way to force admin login if
>> everything fails? Something like the way
>> $update_free_access is changed to TRUE to allow running
>> update.php....?
>>
>> A client got locked out of D6.15 completely, including
>> admin. Login seems to work (I see admin only links on
>> logon), cookies are set, but only on the initial page....
>> any subsequent click is treated as done by an anonymous
>> user (checked the watchdog this way). I've cleared all
>> browser caches, Drupal caches via the db, also the Drupal
>> sessions table, checked the cookie domain, the admin user
>> record exists in the user table, etc. in settings.php,
>> deleted and re-uploaded D6.15. Nothing in the php logs.
>> Nothing unusual in watchdog - just access denied by
>> anonymous... Spent an equivalent of a day on this but I
>> know there is a ton of things I can still try - e.g.
>> rebuild access rights. But I do need to log in first,
>> only by myself. So... is there a way to force admin
>> login? Cannot find this info anywhere.
>>
>> Thanks!
>>
>> Tomáš
>>
>>
>>
>>
>> --
>> Randy Fay
>> Drupal Development, troubleshooting, and debugging
>> randy at randyfay.com <mailto:randy at randyfay.com>
>> +1 970.462.7450
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20100224/84d875db/attachment.html
More information about the development
mailing list