"Ng Hwee Hwee" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all, > > 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..
Hi Hwee, you should not store more than the session id in a cookie. The session data itself belongs into $_SESSION. > 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. Your gc_maxlifetime setting is set to 1440 seconds which means 24 minutes. So every 24 minutes the garbage collection is checked if it should be deleted (based on gc_probability). Try increasing your gc_maxlifetime to a higher value, e.g. 43200 for 12 hours. Regards, Torsten > > thanks in advance! > > hwee -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php