Ng Hwee Hwee wrote:
I have a problem: my $_SESSION variables and $_COOKIE variables get destroyed very often, even though my clients are actively browsing the site (that means, the variables should not be garbage collected).
Our guess is that the network connections are weak. My server is in Singapore but my clients are connecting to it from Japan, Thailand, Australia (some on dial-up) etc... Apparently, their connections get dropped pretty frequently. Thus, their $_SESSION variables and $_COOKIE variables get destroyed everytime their connections are dropped.
Has anyone experienced such phenomenon before? is our guess accurate? if it is, does it mean that the best solution would be to change all our $_SESSION variables to $_COOKIE and set an expiry date to the cookies to 12 hours later or something..
fyi, i'm using PHP4.2.2 and my session.gc_maxlifetime = 1440 and session.gc_probability = 1. I will be upgrading to 4.3.6 in the near future.
thanks in advance!
Are you using a server cluster? If so, do you have some kind of session sharing set up? (Basically you have to either set up the same directory to be pointing to one machine or use a shared DB for session storage).
-- paperCrane <Justin Patrin>
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php