Jump to content

[SOLVED] keeping session variables alive forever


simply07

Recommended Posts

i am having a lot of problems trying to get session variables to stay alive once the browser has closed.

Hi have tried using

ini_set('session.gc_maxlifetime', 60*60);

ini_set('session.cookie_lifetime', 60*60);

 

But they do not work. Is there a way to keep the session variables alive when the browser is closed?

 

Also has anyone ever heard of using .htaccess to keep the session variables alive?

I need any help on this, i do not know what to try..

 

As a side note: i do not have access to php.ini or httpd.conf...

 

thanks to anyone who can hel pin any way

Steph

Link to comment
Share on other sites

no, you cannot keep sessions alive after the browser is closed. That's the point of sessions. It's a "session." If you want data persistence beyond sessions, you can look into making a cookie using setcookie(..);  and on page load, getcookie and assign the cookie to a session variable or w/e.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.