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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.