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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

Admin not logging in


Go to End


35 Posts   16175 Views

Avatar
sherman

Community Member, 48 Posts

26 July 2008 at 9:31am

I found this thread and wasnt sure if my problem was related:
http://www.silverstripe.com/site-builders-forum/flat/637

My version of php is: 5.2.2

Might this be the reason my code isnt working?

Security::setDefaultAdmin("admin", "password");

Avatar
sherman

Community Member, 48 Posts

26 July 2008 at 11:28am

<?php
global $project;
$project = 'mysite';

global $databaseConfig;
$databaseConfig = array(
"type" => "MySQLDatabase",
"server" => "pedstaff.fatcowmysql.com",
"username" => "peds",
"password" => "saf3ty",
"database" => "ss_mysite",
);

// Sites running on the following servers will be
// run in development mode. See
// http://doc.silverstripe.com/doku.php?id=devmode
// for a description of what dev mode does.
Director::set_dev_servers(array(
'localhost',
'127.0.0.1',
));
// This line set's the current theme. More themes can be
// downloaded from http://www.silverstripe.com/cms-themes-and-skin
SSViewer::set_theme('peds');

Security::setDefaultAdmin("admin", "password");

?>

Avatar
Phalkunz

Community Member, 69 Posts

26 July 2008 at 2:23pm

Edited: 26/07/2008 2:23pm

There are times when the password and username are correct but you're not redirected to the admin page. Read the notification message in the form. If it says you are logged in as ... try to hit this url http://peds.org/_devsite/admin manually.

Avatar
sherman

Community Member, 48 Posts

26 July 2008 at 2:34pm

I see what your saying but it didnt like that.

Avatar
Phalkunz

Community Member, 69 Posts

26 July 2008 at 2:43pm

Umm what did it say exactly?

Avatar
sherman

Community Member, 48 Posts

26 July 2008 at 3:05pm

It did nothing, just the login screen.

Avatar
Phalkunz

Community Member, 69 Posts

26 July 2008 at 3:11pm

that's weird. well, make sure the username and password are correct and hit the url i mentioned eariler after the login process.

Avatar
sherman

Community Member, 48 Posts

26 July 2008 at 4:03pm

Not too sure what you mean by hit it manually.