Jump to:

4945 Posts in 17751 Topics by 1494 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Unix to Windows migration - CMS Login not working

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

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

Page: 1 2
Go to End
Author Topic: 4145 Views
  • Double-A-Ron
    Avatar
    Community Member
    604 Posts

    Unix to Windows migration - CMS Login not working Link to this post

    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

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: Unix to Windows migration - CMS Login not working Link to this post

    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.

  • vancouverWill
    Avatar
    Community Member
    121 Posts

    Re: Unix to Windows migration - CMS Login not working Link to this post

    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

  • biapar
    Avatar
    Forum Moderator
    435 Posts

    Re: Unix to Windows migration - CMS Login not working Link to this post

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

  • banal
    Avatar
    Community Member
    901 Posts

    Re: Unix to Windows migration - CMS Login not working Link to this post

    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.

  • biapar
    Avatar
    Forum Moderator
    435 Posts

    Re: Unix to Windows migration - CMS Login not working Link to this post

    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?

  • banal
    Avatar
    Community Member
    901 Posts

    Re: Unix to Windows migration - CMS Login not working Link to this post

    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)

  • biapar
    Avatar
    Forum Moderator
    435 Posts

    Re: Unix to Windows migration - CMS Login not working Link to this post

    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');
    ?>

    4145 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.