I have an odd situation on my hands. I can only login at thinkingliberal.com when I request a new password and use the one-time login link.

However, my friend can login fine on the site.

Furthermore, I've set my browser to accept all cookies.

I'm worried that other users may have the same problem.

I've been reading the forum threads about login problems, but none seem to relate to my specific problem.

Any ideas?

Comments

madman2’s picture

Login Fails with no error

Actually this seems to be a long running problem see http://drupal.org/node/6696.
As a new user of Drupal I'm staggered that this seems to be such a continuious theme over such a long period of time without someone either a solving the problem or at least summarising things in the FAQ/Buglists.
I too have the same problem on my production server, which is running

  • Drupal 4.7
  • Windows 2000
  • IIS 5
  • MySQL 4.1.17
  • PHP 5

My development PC at home running XP, MySQL 4.1.15, and PHP5, works fine.
It does seem to be a cookie problem and I can definately say

  1. The system creates a session entry in the watchdog table
  2. and it appears in the administer logfile display
  3. using the 1 time password login, creates a user session cookie in both IE and FF
  4. loging in normally, and failing! does NOT create the cookie, or any obvious error messages

Short of doing a complete re-install I'm at a loss of where to go next, other than down the pub of course!

Parkasaurus’s picture

Thanks madman. I've been trying solutions on the thread. So far, no luck.

Cheers,

JP

heine’s picture

As a new user of Drupal I'm staggered that this seems to be such a continuious theme over such a long period of time without someone either a solving the problem or at least summarising things in the FAQ/Buglists.

No one seems to have filed a proper bug report. Here's an attempt: http://drupal.org/node/61900

--
When your problem is solved, please post a follow-up to the thread you started.

lambert-1’s picture

I went to look at the sessions table, and saw the following alert (triangle with exclamation point) in PHPadmin:

PRIMARY and INDEX keys should not both be set for column `sid`

Here are the fields and the indexes:

Field       Type            Attributes   Null   Default
------------------------------------------------------
uid         int(10)         UNSIGNED     No      0
sid         varchar(32)                  No
hostname    varchar(128)                 No
timestamp   int(11)                      No      0
cache       int(11)                      No      0
session     longtext                     Yes    NULL
Keyname      Type       Cardinality   Field
------------------------------------------------
PRIMARY      PRIMARY    886           sid
uid          INDEX      14            uid
sid          INDEX      886           sid
timestamp    INDEX      886           timestamp

This is from a 4.6.5 database upgraded to 4.7. In the update script, the following line appeared:

Failed: ALTER TABLE {sessions} ADD PRIMARY KEY sid (sid).

So I updated that table manually. Could this be a source of the difficulty?

Luetkahans’s picture

http://drupal.org/node/53838 discusses the same problem when upgrading from 4.6.5 or lower to 4.6.6.

The comment http://drupal.org/node/53838#comment-111473 suggested:

"The other option is to simply comment out the following three lines in the user.module:

(somewhere around lines 816-818)

$old_session_id = session_id();
session_regenerate_id();
db_query("UPDATE {sessions} SET sid = '%s' WHERE sid = '%s'", session_id(), $old_session_id);
but then you're bypassing the security patch update."

This worked on my site for 4.7.0.

Windows 2000
IIS 5
PHP 5.1.4

aventurer’s picture

I just experienced this very problem and thought my whole install was shot. After reading the above messages about session problems, I closed out all instances of IE on my machine, then went to Internet Options > Delete Cookies. I was able to log back in at this point.

Also discovered a site that had a useful comment on how to reset the admin password directly - you can login via mysql and run: update users set pass=md5('NEWPASS') where uid = 1;

Handy if for whatever reason your server is not sending out email, etc.

Dave