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.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

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

Unix to Windows migration - CMS Login not working


Go to End


16 Posts   5812 Views

Avatar
Double-A-Ron

Community Member, 607 Posts

9 March 2009 at 3:03pm

Hi all,

I've come across this twice now, so trying to figure out what's going on as it will a rather common task for me.

I have a site developed and live on a *Nix server. Working fine.

I have since decided to a local copy to a new computer running windows and WAMP for development purposes and so I can upgrade the site from 2.2.3 to 2.3.0.

I have transferred the code base (and updated sapphire, cms and jsparty to 2.3), and also transferred a copy of the database with MySQL lower_case_table_names set to 2 so all the table names are matching between local and live.

The local site appears to work fine aside from a few js errors, however I am unable to login to admin using the same credentials that I use on the live site.

Any ideas of why this would be? As I said, this has now happened twice. The first was a direct copy of a 2.2.3 site, the second was a live 2.2.3 site updated to 2.3.0 locally.

Cheers
Aaron

Avatar
Sam

Administrator, 690 Posts

9 March 2009 at 3:28pm

It sounds like there's something wrong with the password encryption mechanism. Here's a fix:

1) Add this line to your mysite/_config.php file
Security::setDefaultAdmin("username", "password");

2) Log into the CMS using username, password given above.

3) Reset the admin email / password in the security area

4) Log out and log in using the new credentials you've just created.

Avatar
vancouverWill

Community Member, 121 Posts

16 October 2009 at 8:32am

How did this work out for you? I have had a ton of problems the last week with several different silverstripe sites on different servers and the login randomnly failing. I tried deleting the member in the database table, tried hardcoding it in _myconfig.php and all the other suggestions mentioned here and in other threads. In case this helps I have sites on GoDaddy and Ipower and having the same problem with both. Memory limit has been suggested as a problem on some threads but I have the memory limit set at 256M so that should be plenty.

Any good ideas would be great but I'm starting to think I'm going to have to post this as a bug cause it is killing so much of my time with different installations of Silverstripe, different servers and different browsers so I can't see where the problem is coming from.

Thanks

Will

Avatar
biapar

Forum Moderator, 435 Posts

31 October 2009 at 1:55am

I agree! I've the same problem...How Can login into CMS,now? I don't want to reinstall anythings...

Avatar
bummzack

Community Member, 904 Posts

31 October 2009 at 2:12am

I think these issues might be related to this: http://open.silverstripe.org/ticket/3004

Anyway, the solution provided by Sam should work... just make sure to remove the Security::setDefaultAdmin("username", "password"); line from the _config.php file after you reset your password in the CMS.

Avatar
biapar

Forum Moderator, 435 Posts

31 October 2009 at 2:37am

Edited: 31/10/2009 2:50am

I've made this step, but SS redirect me to Login page everytime ( also when it was Security::setDefaultAdmin code ) ...

I'm sure of user and password.

How Can resolve? Is there a method to change via sql, admin password?

Avatar
bummzack

Community Member, 904 Posts

31 October 2009 at 3:41am

That's really strange. Did you enter the User/Password exactly as in the Security::setDefaultAdmin method? The password is case-sensitive, so make sure that matches too.

Can you post the code of your mysite/_config.php file? (replace sensitive information like db credentials)

Avatar
biapar

Forum Moderator, 435 Posts

31 October 2009 at 3:50am

Edited: 31/10/2009 4:10am

yes, is exactly ...
and after put it, SS redirect me to login page and I see a white page with write on "Redirect page to .... output start from mysite/_config.php line 1" that I don't ever seen before...

and if I put site in dev mode, I've _SESSION error.

<?php

global $project;
$project = 'mysite';

global $databaseConfig;
$databaseConfig = array(
"type" => "MySQLDatabase",
"server" => "localhost",
"username" => "c1rb",
"password" => "+++++",
"database" => "+++++",
);

// 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',
));

//Director::set_environment_type("dev");
//Security::setDefaultAdmin('pinco','pincoxyz');

Object::add_extension('SiteTree', 'Translatable');
Translatable::set_default_locale('it_IT');
i18n::set_locale('it_IT');

//HtmlEditorConfig::get('cms')->insertButtonsAfter('formatselect', 'forecolor');

//Director::set_environment_type("dev");
//set email template folder to themes/mytemplate/templates/email
NewsletterAdmin::$template_path = "themes/renee2009/templates/email";

// This line set's the current theme. More themes can be
// downloaded from http://www.silverstripe.com/themes/
SSViewer::set_theme('renee2009');

Security::setDefaultAdmin('pinco','pincoxyz');
?>

Go to Top