Monday, 30 September 2013

How does PHP determine if session is inactive

How does PHP determine if session is inactive

Iam having difficulty understanding why my sessions are expiring/gc'd even
when, for instance, I am calling a file like "update.php" through ajax
every 5sec.
Update.php
session_start();
$_SESSION["blah"]="blah";
session_write_close();
echo "blah";
php settings
session.cookie_lifetime 0
session.gc_maxlifetime = 1440

Question:
How does php actually define "inactivity"?
Does writing the same string into a session variable not count as
activity? Any feedback will be helpful, thanks in advance.

No comments:

Post a Comment