Closed (duplicate)
Project:
Drupal core
Version:
6.x-dev
Component:
base system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Jun 2007 at 19:55 UTC
Updated:
27 Jun 2007 at 14:23 UTC
Hey all.
Here's what happened:
I installed Drupal 6 dev on a Windows 2003 machine running IIS 6, mySQL 4.1, and php 5.
I entered in all of the information, including the admin account name, email, and password.
I got a time out error after 60 seconds.
I went back to the index.php page and logged in under the admin account.
I clicked "visit the administration section" and got:
Access denied
You are not authorized to access this page.
When I went in to view my account, no settings were available for me to change that would have anything to do with drupal permissions. This is the first account ever created for this drupal installation.
Comments
Comment #1
stborchertHi.
Same problem here.
- obtained a fresh copy of drupal 6.x from cvs
- setup new database
- inserted all required information and created admin account
- if I try to go to admin/* => "Access denied"
- menu only contains "My account" and "Log out"
Wondering why admin has uid = 2.
Ah, that's it!
After changing the uid to 1 in the database everything works fine.
Comment #2
stborchertOk, I had a closer look to whats happening there and found line 188 in system.install:
db_query("SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'");.This doesn't seem to work on all mysql versions (mine is 4.1.11-nt), though it should work (added in MySQL 4.1.1).
Probably an additional
ALTER TABLE {users} SET auto_increment=1after inserting user 0 would solve this.Comment #3
stborchertUnfortuantely it doesn't solve this problem.
db_query("SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'");is executed and returnsTRUEbutSHOW VARIABLES LIKE 'sql_mode'returns a blank result.Even if I set the variable manually the uid is inserted wrong (auto_increment is set to 2 after creating account 0).
Weird.
Comment #4
webernet commentedDuplicate of: http://drupal.org/node/149540