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.

HELP. can't login to CP after switching Session type to cookies only

May 01, 2012 11:39am

Subscribe [1]
  • #1 / May 01, 2012 11:39am

    Cartegraph

    83 posts

    I am running 2.3.1 (tried to upgrade to 2.4 but had install issues, so reverted) and MSM. I switched my secondary site to cookies only, and can login without problems. however when i try to login to my main site the login just reverts me back to the login page without any errors.

    When I try to log into my secondary site and switch over to my main site, nothing happens it just takes me back to the cp home of my secondary site.

    On top of all of this is the reason that i was switching around my session type. I am getting frequently kicked out of my cp session as are other users and some times they have just spent a half an hour perfecting an entry. This is really frustrating and am wondering if someone could take a look for me?

    Edit: I have found that I can type the main CP url in the address bar and get to it that way but i I have to login through the secondary site first and then do that. And I still cannot switch between sites the conventional way.

    Since I was able to get to my main CP I switched back the session type to Sessions Only. This then allowed me to login to my main sites CP.

  • #2 / May 02, 2012 10:41am

    Dan Decker

    7338 posts

    Hi Luke,

    I’m sorry you went through all the trouble of switching up your Control Panel sessions. The problem you are trying to solve, timeouts, is a known bug and wouldn’t have been fixed by what you are trying to do. I apologize for that frustration.

    You can hardcode this in /system/expressionengine/config/config.php
    Add or change these variables:

    $config['cookie_prefix'] = '';
    $config['cookie_path'] = '';
    $config['cookie_domain'] = '';
    $config['user_session_type'] = 'c';
    $config['admin_session_type'] = 's';

    I look forward to your reply!

    Cheers,

  • #3 / May 02, 2012 11:20am

    Cartegraph

    83 posts

    Thanks for the response. I have hardcoded those values into my config.php file.  Is there any insight on the resolution to the bug? its seems like a major issue. I have vested 100% of my companies web technology into ExpressionEngine because when I am not getting logged out it’s flexibility is second to none. Hoping for a resolutions soon as I can only hold back the fire so long before I start catching some heat. Just being able to tell my superiors that it is currently being diligently worked on would buy me some time.

    EDIT:
    This didn’t fix my issue of not being able to switch between site in the CP. When I inspect the link for to switch between the sites i get the following links.

    Cartegraph
    admin.php?S=33aa2bd952e97dd7dfa3c58e61f44491cbc95451&D=cp&C=sites&site_id=1&page=Qz1ob21lcGFnZQ__

    Intranet
    admin.php?S=33aa2bd952e97dd7dfa3c58e61f44491cbc95451&D=cp&C=sites&site_id=2&page=Qz1ob21lcGFnZQ__

    Does that look right?

    Thanks again.

  • #4 / May 02, 2012 1:58pm

    Cartegraph

    83 posts

    Not sure this will help troubleshoot the log out bug. But when i get kicked out, sometimes it won’t allow me to log back in. When i try i get no error messages or anything. So in order to be able to log back in I use the chrome extension “edit this cookie” to delete my cookies. This doesn’t make any sense to me as I am using Sessions Only as my session type and cookies shouldn’t have any affect on my sessions, should it?

    Hope this was helpful.

  • #5 / May 02, 2012 5:37pm

    Dan Decker

    7338 posts

    Hey Luke,

    We thought we had this bug squashed in 2.4, but it is still around a bit.

    Several factors can play into it, being on a corporate network for instance, with changing IP addresses.

    This doesn’t make any sense to me as I am using Sessions Only as my session type and cookies shouldn’t have any affect on my sessions, should it?

    ExpressionEngine will always set a cookie when you login, even if you have “Sessions Only” as it uses the cookie to manage parts of the session. Confusing, sure enough.

    OK, now that I know MSM is in play here - what version of MSM are you using?

    In addition to the config values you changed earlier, I have an example MSM setup. Check your against this example and note any glaring differences for me:

    //CONFIG//
    $config['cp_url'] = "http://engine.dev/admin.php";
    $config['doc_url'] = "http://ellislab.com/expressionengine/user-guide/";
    $config['is_system_on'] = "y";
    $config['allow_extensions'] = "y";
    $config['site_label'] = "Test 23";
    $config['cookie_prefix'] = "";
    $config['multiple_sites_enabled'] = "y";
    
    index.php and admin.php SITE 1
    NO CHANGES
    
    index.php and admin.php SITE 2
    $system_path = '../system';
    /*---------------------------*/
    $assign_to_config['site_name']  = 'msm_test';
    $assign_to_config['cp_url'] = 'http://msm.dev/admin.php';
    $assign_to_config['site_url'] = 'http://msm.dev';
    
    --- admin ---
    $system_path = '../system';
    /*---------------------------*/
    $assign_to_config['site_name']  = 'msm_test';
    $assign_to_config['cp_url'] = 'http://msm.dev/admin.php';

    Cheers,

  • #6 / May 04, 2012 11:25am

    Cartegraph

    83 posts

    Ok another piece of the puzzle. I noticed, when a new member registers for the main site. The email notification that i get says this


    New member registration site: Cartegraph

    Screen name: Ben ******
    User name: b***due
    Email: b*****e@ci****.us

    Your control panel URL: http://www.*****.com.com/intranet/admin.php

    Which is the CP of my secondary site.

  • #7 / May 07, 2012 3:50pm

    Dan Decker

    7338 posts

    Hi Luke,

    Thanks for the extra info!

    Did you have a chance to check your MSM version?

    Have you taken a moment to note the differences on your sites vs. my examples above?

    That information will be key in moving forward.

    Thanks!

  • #8 / May 07, 2012 3:53pm

    Cartegraph

    83 posts

    Shoot, I had thought I had asked a question here, but guess not. In your example above what file is it that you’re referencing? the main sites config.php file or a specific sites index.html file?

    My MSM version is: Version: 2.1.1 Build: 20111011

  • #9 / May 09, 2012 10:01am

    Cartegraph

    83 posts

    Got this figured out. Somewhere down the line my assign_to_config variables got messed up. All is good on this front now. Thanks.

    While i’ve got you here, can you give me any kind of update on the progress of the log out bug? I have upgraded to 2.5 and they are still experiencing it. Thought it might be fixed in 2.5 but, must not have been. My user’s are getting very frustrated. Is there anything that I can do to ease the pain?

    Thanks,
    Luke

  • #10 / May 10, 2012 4:32pm

    Dan Decker

    7338 posts

    Hey Luke,

    No sir, that bug is still in 2.5. I am sorry for the frustration, we suffer through the effects of it here on the forums as well.

    I’m glad you got MSM all sorted out.

    Is there anything else I can assist you with?

    Cheers,

  • #11 / May 10, 2012 4:34pm

    Cartegraph

    83 posts

    Something weird that i noticed. Switching between only works if i log into my secondary site first.

    Once I switch to my main site i can switch back to my secondary again. But if i log into my main site first, I can’t switch to my secondary site.

  • #12 / May 15, 2012 12:17pm

    Dan Decker

    7338 posts

    Hi Luke,

    But if i log into my main site first, I can’t switch to my secondary site.

    What URL are you login in at?

    If you log in to each site at domain.com/admin.php, then you should be able to switch no problem. However, if you login to your first site at domain.com/system/index.php then you might have trouble switching between the 2.

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases