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.

Session resets on first page refresh

December 08, 2012 4:25am

Subscribe [3]
  • #1 / Dec 08, 2012 4:25am

    Ki

    58 posts

    I have come across something interesting.
    When I first go into the site typing http://www.example.com I have a particular session ID assigned.
    When I reload current page via browser reload/refresh button, that session ID changes and all session info is lost.
    Upon subsequent refreshes and browsing the session id is maintained. It seems that only upon the first refresh is the session id reset and all session info is lost.
    I dont have any session->destroy() code so why is the session not being maintained from the first page load?

    Configs:

    $config['sess_cookie_name']  = 'ci_session';
    $config['sess_expiration']  = 7200;
    $config['sess_expire_on_close'] = FALSE;
    $config['sess_encrypt_cookie'] = FALSE;
    $config['sess_use_database'] = TRUE;
    $config['sess_table_name']  = 'ci_sessions';
    $config['sess_match_ip']  = FALSE;
    $config['sess_match_useragent'] = TRUE;
    $config['sess_time_to_update'] = 3600;
  • #2 / Dec 08, 2012 6:51am

    foecum

    1 posts

    i noticed the same thing too and tried to hack the sessions class but i didn’t work how i wanted it to. it wasn’t easy to find out if the user is logged in since custom data is destroyed(without u knowing) 😠. I created a another Sessions class(Library) which i used it integrate the other funtionalities of codeignitor.

  • #3 / Dec 09, 2012 10:00am

    MadWebDesigns

    147 posts

    Hi Ki,

    Which version of EE are you using?

    Do you have any add-ons/plugins installed?

    Are you using htaccess with custom rules etc.?

    Mike

  • #4 / Dec 09, 2012 10:06am

    Ki

    58 posts

    Hi,
    I am using FF 17.0.1
    Firebug and FirePHP addons.

    It seems to be Firefox issue as I have tried it in Opera and Safari and the session is being kept there. But with FF, the initial refresh causes the session ID to change.

  • #5 / Dec 21, 2012 5:52am

    Ki

    58 posts

    Anybody else has this issue? Seems forefox is dropping CI sessions at will

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

ExpressionEngine News!

#eecms, #events, #releases