title: PHP: how to detect if a session has expired automatically?
body: <p>When a session expiration time is defined, is it possible to call an event listener when it expires?</p>
  
  <p>If it is not possible, is it possible to run a cron job to check if a  session has expired?</p>
  
  <p><strong>NOTE:</strong> I'm interested in a server solution. I'm talking about the case there is a session expiration time defined, and the session finishes automatically because that period expired.</p>