Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthoryaantbarb
     
    Hi there,
    I am trying to get a simple login system set up on a site I decided to write in Akelos (it was previously started in Ruby but I needed to move web hosts) but my sessions don't seem to be transferring from page to page.

    I've tried doing simple test by creating a session in one controller, using $_SESSION['session_name'] = 'session_value', then attempting to access the session on another controller but the session is never set when the new page is hit.

    I have tested my php set up by creating a simple test site with 2 pages, page1.php and page2.php, and passing sessions around between them and that works fine, it just seems to be sites written in Akelos which are having trouble (I've tested sessions in another Akelos site I'm doing which currently doesn't use sessions and got the same results)

    Help would be very much appreciated.

    Cheers,

    Ian
    • CommentAuthoryaantbarb
     
    Does anyone have any update for this? I'm really stuck at the moment so would very much appreciate some help.

    Cheers,

    Ian
    • CommentAuthordale
     

    Have you looked into the settings available for AK_SESSION_HANDLER and AK_SESSION_EXPIRE?

    I can't recall exactly how it works but we're certainly using sessions in our application. You might also find this thread of value once you get your sessions working: Akelos hangs

    • CommentAuthoryaantbarb
     
    Thanks for the links, I've updated my code to open and close sessions in the controllers and that appears to have sorted it.

    Cheers again,

    Ian
    • CommentAuthoryaantbarb
     
    Hi again,

    Odd one here. After updating my controller code so that I manually open and close the sessions, the site works locally on my dev machine but not when I upload it to the web host I am using, where I've found out it works perfectly fine without having to open or close sessions myself.

    Could this be a permissions or php ini problem on my dev machine?

    Cheers,

    Ian
    • CommentAuthordale
     
    Hi Ian,

    As far as I can recall the sessions just worked for us. We do have AK_SESSION_HANDLER set which is the value 1 for storing session info in the db. I'm not 100% certain if you have to pick one.

    Based on my version of akelos (a little behind the latest "release") there are a couple of settings that you can check that might be different in your development.php config file versus your production.php. A couple of settings to check:
    AK_HIGH_LOAD_MODE (defaults to false)
    AK_AUTOMATIC_SESSION_START (defaults to !AK_HIGH_LOAD_MODE)

    You're right in that there might be other differences in your environment. Unfortunately, off hand, I can't suggest anything to check for.

    I can't really think of anything else to check for without walking through the request cycle from start to finish. Have you compared the logs for any strange errors?

    Dale