marshall Posted July 31, 2006 Share Posted July 31, 2006 Well, it's very simple..I have a session with a expiring time...When session expire, I would like to redirect the site...Which variable should I set or which function should I use ? Quote Link to comment https://forums.phpfreaks.com/topic/16106-session-problem/ Share on other sites More sharing options...
hackerkts Posted July 31, 2006 Share Posted July 31, 2006 If you want to have a expire time, then I would suggest you to use cookie. Quote Link to comment https://forums.phpfreaks.com/topic/16106-session-problem/#findComment-66377 Share on other sites More sharing options...
wildteen88 Posted July 31, 2006 Share Posted July 31, 2006 [quote author=hackerkts link=topic=102443.msg406489#msg406489 date=1154356631]If you want to have a expire time, then I would suggest you to use cookie.[/quote]Sessions does use a cookie!Also marshall I dont think what you are trying to do is possible. Quote Link to comment https://forums.phpfreaks.com/topic/16106-session-problem/#findComment-66384 Share on other sites More sharing options...
hackerkts Posted July 31, 2006 Share Posted July 31, 2006 But session allow to set the time it expires ? Quote Link to comment https://forums.phpfreaks.com/topic/16106-session-problem/#findComment-66388 Share on other sites More sharing options...
wildteen88 Posted July 31, 2006 Share Posted July 31, 2006 Yess sessions does have time limit until the session timesout, however redirecting the user when the session expires isnt possble I dont think, that is what I meant. Quote Link to comment https://forums.phpfreaks.com/topic/16106-session-problem/#findComment-66390 Share on other sites More sharing options...
hackerkts Posted July 31, 2006 Share Posted July 31, 2006 Ok, thanks for the explaination.And I still think he should use a cookie instead of session, since you can set the seconds until the cookie ends and will redirect to other page as marshall mention. Quote Link to comment https://forums.phpfreaks.com/topic/16106-session-problem/#findComment-66391 Share on other sites More sharing options...
pedrobcabral Posted July 31, 2006 Share Posted July 31, 2006 I do not have shoure but i guess you mush change the value (seconds) "session.cookie_lifetime" in your php.ini file that is set as 0 as default. - expires when user closes the browser. Maybe you would have to check if a var is set, and if not redirect with something like <script>window.location="www.something.com";</script>Do not know if it would work. Quote Link to comment https://forums.phpfreaks.com/topic/16106-session-problem/#findComment-66392 Share on other sites More sharing options...
king arthur Posted July 31, 2006 Share Posted July 31, 2006 [quote author=hackerkts link=topic=102443.msg406505#msg406505 date=1154357647]Ok, thanks for the explaination.And I still think he should use a cookie instead of session, since you can set the seconds until the cookie ends and will redirect to other page as marshall mention.[/quote]You can certainly set the time until a cookie expires but it still won't cause anything to be redirected. Quote Link to comment https://forums.phpfreaks.com/topic/16106-session-problem/#findComment-66400 Share on other sites More sharing options...
pedrobcabral Posted July 31, 2006 Share Posted July 31, 2006 Maybe.. unless you check if session does or not exists.. Quote Link to comment https://forums.phpfreaks.com/topic/16106-session-problem/#findComment-66401 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.