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.

CodeIgniter Session Problems Thread

November 19, 2009 3:05pm

Subscribe [23]
  • #31 / Mar 07, 2012 1:10pm

    Pakm@n

    9 posts

    Ok I’ve resolved the issue I was having after reading a post over at http://ellislab.com/forums/viewthread/100916/

    By setting my cookie_domain option to the name of my domain, it allowed me to save sessions (because CI uses cookies to save the session, and this server must require you to explicitly outline the cookie domain)

    So for anyone else having troubles like this, What fixed the problem:

    $config['cookie_domain'] = '';

    Change to

    $config['cookie_domain'] = 'darklite.com.au'; // whatever your domain name is


    This thread also helped me because i couldn’t login to my admin panel using sessions on a computer with IE9, i dont know if i was working on compatibility mode or something but i was working well on my computer, then i tried on a different one and didn’t let me login until i added my domain name

    Thanks !

  • #32 / May 21, 2013 6:09am

    bhaskarudu

    4 posts

    this is because of strange session mechanism of CI which can be changed easy. i changed the session library then it is working fine.

    1.  download and place below file in application/library
    2.  add below line in config.php
        $config[‘sess_storage_location’] = APPPATH.‘sessions’;
    3.  create session directory in application.
    4.  grant all writable permissions on session directory

    You are done.

     

  • #33 / May 21, 2013 6:12am

    bhaskarudu

    4 posts

    sorry forgot to attache file. find it here

  • #34 / Jun 28, 2013 5:56pm

    josepostiga

    1 posts

    This problem really exists and should be taken care of by the CI team…

    @bhaskarudu
    Thank you for the class, it really helped me a lot! Actually it solved mostly of the problems i was having with the original CI_Session class, like many of you.

    I’ve made some modifications to your class, however. Your class was exiting with an error (DS constant not defined) and was not terminating sessions variables properly (data still in session after calling sess_destroy function) in CI v2.1.x

    Like you, i’ve attached the modified file in here for others to use.

  • #35 / Aug 21, 2013 5:58am

    toeyya

    1 posts

    thanks, Jonathan Angel
    i have seem problem and i fix that your solutions

  • #36 / Aug 22, 2013 3:31am

    pettersolberg

    22 posts

    Recently I came across what I believe is thas nasty CI session bug in a fairly big webapplication I’ve been developing for about a year.

    Long story short: based on CI’s session we allow only logged in user to take some actions. At one point in the workflow we let the user to upload photos (we used jQuery plugin to do that with AJAX and in the background - jQuery file upload).

    When we implemented that feature, we started facing user logouts (well not really: the session was probably destroyed/invalidated and instead of the controllers output we got a 302, then in turn the browser sucked in the main page - because of the logout).

    At this point, the problems still appear, but at a low rate. We’re still working against that bug. A complete rewrite to PHP’s native sessions would take a week.

    So, those were my two cents.

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

ExpressionEngine News!

#eecms, #events, #releases