_SESSION_TIMEOUT parameter and set it to the number of minutes of inactivity after which the action server has to time out any session it has created. The default value is -1 meaning the server will never time out a session;
_INVALID_SESSION parameter in the _ERROR_PAGES array and set it to the URI of the error page that the server has to show in case a session is timed out. If you donot specify this page, Phrame will show a blank page!
You may want to implement language negotiation to enable the server to show different error pages for different languages (see How To Use Language Negotiation).
$containerConfig = array(
_SESSION_CONFIG => array(
_SESSION_TIMEOUT => 30 // time out after 30 minutes
) // of inactivity
,_ERROR_PAGES => array(
_INVALID_SESSION => '/path/to/invalidsession.html'
...
other error pages go here
...
)
...
other container configuration parameters go here
...
);
maxInactiveInterval property. For example:
// Set timeout period to 30 minutes (to be specified // in miliseconds!) $session =& $request->getSession(); $session->setMaxInactiveInterval(3600);Use a session's
invalidate() method to invalidate it immediately. For example:
// Invalidate session immediately (will be effective // when the user submits a new request) $session =& $request->getSession(); $session->invalidate();