| 
<?phprequire_once('utils.inc.php');
 require_once('../handlers/stackSess.inc.php');
 require_once('../handlers/compat.inc.php');
 
 session_name('SESS_CP');
 
 logger("started");
 $handler=new compatSessionHandler();
 $handler->setLogger('logger');
 
 if (!$handler->install()) {
 print "set handler failed";
 exit;
 }
 logger("* about to call session_start()");
 
 session_start();
 if (!isset($_SESSION['c'])) {
 $_SESSION['c']=0;
 }
 if (!($_SESSION['c'] % 3)) {
 logger("* about to regenerate");
 session_regenerate_id();
 }
 ++$_SESSION['c'];
 logger("about to finish");
 session_write_close();
 ?>
 <html>
 <H1>The Compatability Handler</H1>
 <p>
 This handler is intended to replicate the functionality of the builtin session handler - i.e.
 it is a storage handler, using files (and optionally a hierarchy of directories).
 </p><p>
 As with the standard handler, files are locked between session_start() and session_write_close()
 to prevent overlapping read/write cycles. Session data is available after session expiry if
 the file has not been removed by garbage collection.
 </p><p>
 This handler is intended to be used in conjunction with other, more useful handlers - on its
 own it provides only the same facilities the builtin handler but at a greater performance/scalability cost.
 </p><p>
 The logging output of the handler is shown below:<br />
 <?php
 print "OK:++\$_SESSION['c']=" . $_SESSION['c'] . "<pre>$statuslog</pre>";
 exit;
 
 
 |