Thursday, March 29, 2007

duplicate session key

For the past few days, I've been getting a fatal error in Drupal when trying to log in. It was complaining about trying to insert a duplicate id in the session table. This has come up before and is the result of user 0 being deleted. To fix:

INSERT INTO users (uid, name, mail) VALUES ('0', '', '');
INSERT INTO users_roles (uid, rid) VALUES (0, 1);
INSERT INTO node_access VALUES (0, 0, 'all', 1, 0, 0);

DELETE FROM sessions;
DELETE FROM cache;

0 Comments:

Post a Comment

<< Home