Custom session save handler. What's happens really?

From: Date: Fri, 04 May 2007 07:26:44 +0000
Subject: Custom session save handler. What's happens really?
Groups: php.general 
Request: Send a blank email to php-general+get-254388@lists.php.net to get a copy of this message
Hi, i'm using in each script: <? session_set_save_handler(...); //register my custom function to store session //into a mysql database session_start(); //session.auto_start is set to 0 in php.ini register_shutdown("session_write_close"); $object = unserialize($_SESSION['objectname']); //modify the object //.... $_SESSION['objectname'] = serialize($object); ?> When are exactly called the write and read function of my custom handler? Is it at the session_start that read function is called? or is it at $object = unserialize($_SESSION['objectname'])? Is write function called at session_write_close only? or any time $_SESSION[] is writted? Thanks a lot, I have no clue from PHP tutorial about this...

« previous php.general (#254388) next »