Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Repeated admin login required when rebuilding database


Reply

8 Posts   1859 Views

Avatar
Colin

1 August 2007 at 6:09pm Community Member, 15 Posts

I have a fully functioning install of 2.02 at harwoodartcenter.org/ss/. If I attempt to rebuild the database by using harwoodartcenter.org/ss/db/build?flush=1, I am given a browser-based login screen, requesting my SS developer login. No matter how many times, I enter this, it continues to repeat this request.

I know the login is correct. What can I do?

Avatar
Sean

1 August 2007 at 10:27pm (Last edited: 1 August 2007 10:28pm), Forum Moderator, 921 Posts

I believe the problem is you don't have a Member in the system that has ADMIN code permission rights.

Could you confirm these things using phpMyAdmin:

* You have a member record containing ID = 1 in the Member table
* You have a Group_Members table with a record containing GroupID = 1, and MemberID = 1
* You have a Permission table with a record containing GroupID = 1 and Code = ADMIN

Am I right in assuming you dropped the database, and rebuilt from scratch to achieve the problem you're currently having? Or is it from a fresh 'untouched' database from the install?

Hope this helps,

Sean

Avatar
Colin

2 August 2007 at 6:01pm Community Member, 15 Posts

Sean,

All the things you mentioned were present. It is a squeeky clean brand new install.

Avatar
chlo

2 August 2007 at 6:17pm 6 Posts

I just thought I'd add that I encountered exactly the same issue upgrading from 2.0.1 to 2.0.2b which I just described (in less depth, but this jogged my memory), here:
[url]http://www.silverstripe.com/general-discussion/flat/3143[/url]

I too, checked all of these things in phpMyAdmin and all are present.

Avatar
Willr

2 August 2007 at 6:23pm Forum Moderator, 5511 Posts

The thing is in 2.02 Silverstripenow requires a password to build the db while the site is 'live' and for whatever reasons this feature doesnt work all the time..

know the login is correct. What can I do?

well for one, you can just put the site into 'dev' mode while you need to do a db/build.. Read about this here -> http://doc.silverstripe.com/doku.php?id=devmode Basically in dev mode you wont need to use a password to db/build :D

Avatar
Markus

2 August 2007 at 9:11pm Google Summer of Code Hacker, 152 Posts

I applied a patch to the GSoC branch that resolves this problem.. maybe you want to merge it into the trunk branch!? It's in r39559.

Maybe you need to merge also some of my changes to the Member class, namely Member::currentUser() and Member::isAdmin() respectively Member::_isAdmin().

Avatar
Andy

6 August 2007 at 12:48pm 230 Posts

Thanks, I've merged this into trunk. :)

Avatar
Markus

6 August 2007 at 8:04pm Google Summer of Code Hacker, 152 Posts

Great. That means you should find it soon in the [url=http://dailybuilds.silverstripe.com]daily builds[/url] :-)