View Full Version : Session Problem in PHP
ranjita
06-08-2006, 01:17 PM
I am using session variables in site for retrieving the name of the person who logs in.
But the session variable expires while navigating through pages.
Kindly, suggest the efficient way to store the username who logs in.
Any suggestions will be greatly appreciated.
welcome here!
i suppose that you mean that the session expires...
if you only need the username, then you can use a persistent cookie and store the username there.
if you need to keep the session alive, then you need to make sure that you don't destroy the session anywhere in your scripts, and that your garbage collection parameters are set high enough to keep the sessions alive for the desired period of inactivity. Setting the gc parameters is a bit trial and error (based on the number of pagerequests on your site)
FuZion
06-09-2006, 08:12 PM
Are you putting a session_start(); at the begginning of each page to join the session?
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.