Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Some tricks on PHP session

1. Session timeout problemThere is a nuance we found with session timing out although the user is still active in the session.  The problem has to do with never modifying the session variable. The GC will clear the session data files based on their last modification time.  Thus if you never modify the session, you simply read from it, then the GC will eventually clean up. To prevent this you need to ensure that your session is modified within the GC delete time.  You can accomplish this like below. if(!isset($_SESSION["last_access"]) || (time() - $_SESSION["last_access"]) >= ...

13,716 4       PHP SOLUTION SESSION TIMEOUT VARIOUS DOMAIN