1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Rep Power

    Session length without php.ini access

    I need to keep a session alive for 3 days, even if the user shuts down his or her pc..

    I found a solution thanks to some people from this forum but now i heard i have no php.ini access.. Any other ideas?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jul 2003
    Rep Power
    Heard? I'm guessing you mean you do not have the rights to modify php.ini. If that is the case use set_ini.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  4. #3
  5. Impoverished Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Washington, USA
    Rep Power
    Or session_set_cookie_params, both of which have to be called before the session_start() every time you use sessions.

    Odds are you can use a .htaccess or web.config to set the values more easily, like
    # .htaccess
    php_value session.cookie_lifetime 259200
  6. #4
  7. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Pennsylvania, USA
    Rep Power
    Seriously, you have now been told this five times. I'm closing this thread, read the responses, read the manual, and learn to help yourself. Set the session values using ini_set. DONE.
    Last edited by ManiacDan; May 10th, 2013 at 01:07 PM.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.

IMN logo majestic logo threadwatch logo seochat tools logo