ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Migration problem - cannot login after importing SQL file

May 29, 2011 5:20am

Subscribe [3]
  • #1 / May 29, 2011 5:20am

    fogcity

    260 posts

    I am attempting to migrate an EE1 site from the test server to the client’s server. I’ve installed EE 1.7 on the client server, exported the EE database from the test server and imported it successfully to the client server.

    However, now I cannot login to my EE CP on the client server. Seems all the member data is gone, or messed up. I tried simply exporting the member data and importing that, but to no avail. The import seems to work but it refuses all the known-good logins from the test site.

    Any idea on how to recover from this without reinstalling EE?

  • #2 / May 31, 2011 5:35am

    John Henry Donovan

    12339 posts

    fogcity,

    What version of EE are you migrating from?
    There is no need to install a fresh copy on clients new server. All that needs to be done is move all the files over and then import database. Then update your config with the correct settings and update any paths within your control panel

    What happens when you try and login to cp? Do you get an error message or does page refresh?

  • #3 / May 31, 2011 1:43pm

    fogcity

    260 posts

    fogcity,

    What version of EE are you migrating from?
    There is no need to install a fresh copy on clients new server. All that needs to be done is move all the files over and then import database. Then update your config with the correct settings and update any paths within your control panel

    What happens when you try and login to cp? Do you get an error message or does page refresh?

    Thanks for the reply.

    I am migrating from v1.7.0.

    It’s not my first migration, but your suggestion sounded tantalizingly simple so I deleted everything on the new server, moved files over from the old server and imported database.

    First problem: I couldn’t reach the CP login page. Error says can’t connect to dbase. So I edited the copied-over config.php and set the new database name and user/password for accessing it.

    With that taken care of, I do see my login page. But when I type my login information it doesn’t appear to be accepted. No error message, I just get the login page back with all fields empty. Reloading just gives me the same CP login page.

    Possible clue: The CP login page is entirely unstyled (my site has a custom CP theme which I set up years ago; clearly this isn’t being found). I assume because the EE dbase I imported still has the old server’s path information. I’d fix that by logging in… but of course, I can’t log in.

    Additional clue: After the CP login screen comes back blank, my URL contains a session string: “?S=c026bea811de7cb45e5ffd60b4fb7a56c00f360e”. Which is strange, since my EE configuration has my session settings to “cookies only”. I assume this preference should have been imported along with the rest of my EE database?

    Thoughts?

  • #4 / Jun 01, 2011 10:53am

    Kevin Smith

    4784 posts

    HI fogcity—

    When I work with an EE site that needs to move from one server to the next (i.e. development to production), I find it easier to set many of my paths in the config.php rather than within in the CP. Anything set in config.php takes precedence over the settings in the database. (It doesn’t automatically overwrite them, EE just loads the config.php variable if it exists instead of the database config setting.) Here’s a list of possible config.php overrides for EE1.

    You may want to add the following to your config.php file (and adjust the values, of course):

    $conf['site_url'] = "http://sample.com/";
    $conf['tmpl_file_basepath'] = "/path/to/system/templates";
    $conf['theme_folder_url'] = "http://sample.com/themes/";
    $conf['theme_folder_path'] = "/path/to/themes/";

    If setting the config.php variables manually does the trick, here’s a good resource for one way to achieve this multi-server setup with a config.php file that auto-determines the paths and URLs. I’d recommend taking a look at that.

    Give this a try and let us know if you’re still having issues logging in.

  • #5 / Jun 01, 2011 10:51pm

    fogcity

    260 posts

    That’s a great suggestion, Kevin… with great potential for simplifying migrations.

    But it doesn’t work for me. I removed everything, then started over:

    copied all files from old to new server
    export / import my EE database

    Then I followed your suggestion, and modified the config.php in my EE directory.

    My login page is now styled properly—so EE is now finding my custom CP template.

    But logins still fail, as they did before.

    Interestingly, when I type a bad username and submit, the CP login page comes back with an error that the username was not found. So the mechanism is working in that regard. But when I enter a good (superadmin) userid and pwd, i get the same login page with no error.

    Suggestions?

  • #6 / Jun 02, 2011 3:15pm

    Brandon Jones

    5500 posts

    Hi fogcity,

    A login loop is typically a cookie issue. Try adding the following to config.php:

    $conf[‘cookie_prefix’] = “”;
    $conf[‘cookie_domain’] = ‘’;
    $conf[‘admin_session_type’] = “c”;

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases