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

Admin not logging in


Reply

35 Posts   12314 Views

Avatar
sherman

26 July 2008 at 9:31am Community Member, 48 Posts

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

26 July 2008 at 11:28am Community Member, 48 Posts

<?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

26 July 2008 at 2:23pm (Last edited: 26 July 2008 2:23pm), 69 Posts

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

26 July 2008 at 2:34pm Community Member, 48 Posts

I see what your saying but it didnt like that.

Avatar
Phalkunz

26 July 2008 at 2:43pm 69 Posts

Umm what did it say exactly?

Avatar
sherman

26 July 2008 at 3:05pm Community Member, 48 Posts

It did nothing, just the login screen.

Avatar
Phalkunz

26 July 2008 at 3:11pm 69 Posts

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

26 July 2008 at 4:03pm Community Member, 48 Posts

Not too sure what you mean by hit it manually.