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.

No login after migration

July 10, 2010 10:07am

Subscribe [6]
  • #1 / Jul 10, 2010 10:07am

    Yorick Peterse

    537 posts

    A few hours ago I decided to sync both files and the database from my production server (yorickpeterse.com) to my local server (localhost). I did this because this would make my life easier (I should’ve known better) due to small differences between both systems.

    Anyway, generating a MySQL dump of the online DB and importing this one into the local server I modified the config files. The frontend of the EE installation was working perfectly fine. It showed my articles, images, and so on. However, when I tried to login in the admin panel it simply refreshes the page without any errors. Even when using incorrect data it just refreshes the page.

    Because there seemed to be quite a lot of folks having the same issue I started looking for a solution, but nothing worked. Cookies, cache, EE cache, config files. I tried it all, nothing worked. It’s probably something very easy, but I can’t seem to get it fixed. Below is the “process flow” of what I did

    1. Delete local copy along with the DB
    2. Compress online copy along with DB and download to local server
    3. Imported DB
    4. Frontend works, login doesn’t.

    After this I tried the following:

    1. Modify paths and such on the online server
    2. Export DB
    3. Import into local MySQL server
    4. Same results

    So in short, I’ve tried quite a lot but I’m stuck at the login panel.

  • #2 / Jul 10, 2010 4:17pm

    Greg Salt

    3988 posts

    Hi Yorick,

    Had you set a cookie domain in your online version? If so, you can disable it in your local version by adding:

    $config['cookie_domain'] = '';

    to your config file.

    Cheers

    Greg

  • #3 / Jul 10, 2010 4:22pm

    Yorick Peterse

    537 posts

    No, the cookie domain hasn’t been set in both the offline and online server. I’ve tried playing around with the cookie settings but it didn’t seem to work. Here’s my config file:

    <?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
    
    /*
    |--------------------------------------------------------------------------
    | ExpressionEngine Config Items
    |--------------------------------------------------------------------------
    |
    | The following items are for use with ExpressionEngine.  The rest of
    | the config items are for use with CodeIgniter.
    |
    */
    
    $config['app_version'] = "202pb01";
    $config['install_lock'] = "";
    $config['license_number'] = "LICENSE CODE";
    $config['debug'] = "1";
    $config['cp_url'] = "http://localhost/webdev/expressionengine/websites/yorickpeterse.com/system/index.php";
    $config['doc_url'] = "http://expressionengine.com/public_beta/docs/";
    $config['is_system_on'] = "y";
    $config['site_label'] = "Yorick Peterse";
    
    $config['allow_extensions'] = "y";
    $config['enable_online_user_tracking'] = "n";
    $config['enable_hit_tracking'] = "n";
    $config['enable_entry_view_tracking'] = "y";
    $config['dynamic_tracking_disabling'] = "";
    
    // END EE config items
    
    
    
    /*
    |--------------------------------------------------------------------------
    | Base Site URL
    |--------------------------------------------------------------------------
    |
    | URL to your CodeIgniter root. Typically this will be your base URL,
    | WITH a trailing slash:
    |
    |    <a href="http://example.com/">http://example.com/</a>
    |
    */
    $config['base_url']    = "http://localhost/webdev/expressionengine/websites/yorickpeterse.com/";
    ......
  • #4 / Jul 10, 2010 5:20pm

    Greg Salt

    3988 posts

    Hi Yorick,

    Are you actually logged in even though you can’t access the CP i.e. if you try and log into the CP and then visit a front end template with a logged_in conditional does it show you as having a valid user session?

    Cheers

    Greg

  • #5 / Jul 10, 2010 7:40pm

    Yorick Peterse

    537 posts

    Hi Yorick,

    Are you actually logged in even though you can’t access the CP i.e. if you try and log into the CP and then visit a front end template with a logged_in conditional does it show you as having a valid user session?

    Cheers

    Greg

    Initially that was the case but it didn’t work after clearing the sessions table and removing all cookie/session data from my browser. I turned on logging as well (up until level 2) but it didn’t show any errors so I assume EE is working as it “should” be, with the exception of not letting me in.

    My guess is that the system thinks the local webserver is actually the online one and thus fails to login. However, the weird thing is that I actually modified all path related settings before dumping the database of the production database.

  • #6 / Jul 11, 2010 3:26pm

    Greg Salt

    3988 posts

    Hi Yorick,

    Can you please try adding a session type override to your config file and trying sessions only:

    $config['admin_session_type'] = 's';

    Cheers

    Greg

  • #7 / Jul 12, 2010 6:08am

    Yorick Peterse

    537 posts

    Hi Yorick,

    Can you please try adding a session type override to your config file and trying sessions only:

    $config['admin_session_type'] = 's';

    Cheers

    Greg

    I tried that but I’m still being redirected back to the login screen, no errors or whatsoever.

  • #8 / Jul 12, 2010 8:35am

    Sue Crocker

    26054 posts

    If you try setting the admin_session_type back to c, what happens then?

  • #9 / Jul 12, 2010 11:00am

    Yorick Peterse

    537 posts

    If you try setting the admin_session_type back to c, what happens then?

    Still nothing, the only difference is that a checkbox showed up that would enable the system to remember my login data.

  • #10 / Jul 12, 2010 10:52pm

    tyler.egeto

    3 posts

    We updated today and had the same issue. Turned out the exp_member_groups table was lost during the upgrade. We manually added some groups to reflect the default set and we’re able to log in again.

    Not sure if it is the same issue though.

    EDIT: OOPS sorry, ours was during update, yours is migrations, probably unrelated.

  • #11 / Jul 13, 2010 2:53am

    John Henry Donovan

    12339 posts

    Yorick,

    I actually modified all path related settings before dumping the database of the production database.

    Just to confirm. Where did you modify these paths? In the database?

  • #12 / Jul 13, 2010 7:25am

    Yorick Peterse

    537 posts

    Yorick,

    I actually modified all path related settings before dumping the database of the production database.

    Just to confirm. Where did you modify these paths? In the database?

    No, using the control panel before I migrated the system to my local server.

  • #13 / Jul 13, 2010 4:08pm

    Yorick Peterse

    537 posts

    I tried upgrading to EE 2.1 but after doing so I’m still unable to login, no errors or whatsoever.

  • #14 / Jul 13, 2010 5:22pm

    Yorick Peterse

    537 posts

    I decided to do some extra hacking in the authentication method of the login controller. It seems that the login data is correct and the system does seem to redirect me to the CP panel. However, for some reason EE fails to save the session data (atleast the cookie as I see none) and therefore redirects me straight back to the login panel.

    Update

    Weird, the session are actually stored in the database: http://cl.ly/1dp8

  • #15 / Jul 13, 2010 5:25pm

    Lisa Wess

    20502 posts

    Yorick, what if you try logging in using 127.0.0.1 instead of localhost?

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

ExpressionEngine News!

#eecms, #events, #releases