ID: 11367 Updated by: sniper Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Bogus Bug Type: *Session related Operating system: PHP Version: 4.0.5 Assigned To: Comments: This example of yours is bogus. 1. you should prefix the func names with, e.g. sess_ 2. you can't use same file to logging and storing session data. Session file has to be unique for each session. Previous Comments: --------------------------------------------------------------------------- [2001-06-08 15:55:52] [EMAIL PROTECTED] ===cut=== <?php function open ($save_path, $session_name) { $f = fopen('log', 'a'); fputs($f, "open ($save_path, $session_name)n"); fclose($f); return true; } function close() { $f = fopen('log', 'a'); fputs($f, "closen"); fclose($f); return true; } function read ($key) { $f = fopen('log', 'a'); fputs($f, "read ($key)n"); fclose($f); return "foo|i:1;"; } function write ($key, $val) { $f = fopen('log', 'a'); fputs($f, "write ($key, $val)n"); fclose($f); return true; } function destroy ($key) { $f = fopen('log', 'a'); fputs($f, "destroy($key)n"); fclose($f); return true; } function gc ($maxlifetime) { return true; } session_set_save_handler ("open", "close", "read", "write", "destroy", "gc"); session_start(); $foo++; ?> ===cut=== -this will produce one "log" in the document-root directory and another in the root dir. --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=11367&edit=2 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]