|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-08-17 16:22 UTC] sas@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 16 18:00:01 2025 UTC |
I've written the following PHP script to test storing session datas into an Oracle 8i database : <? function sess_open($save_path, $session_name) { return true; } function sess_close() { return true; } function sess_read($key) { print "READ !"; include("oci8.inc"); $db=new DB; $db->connect(); $db->query("SELECT value FROM php_sessions WHERE sesskey = '$key' AND expiry > " . time()); if (list($value) = $db->FetchRow()) { return $value; } return false; } function sess_write($key, $val) { print "WRITE!"; include("oci8.inc"); $db=new DB; $db->connect(); $expiry = time() + $SESS_LIFE; $value = addslashes($val); $db->Query("INSERT INTO php_sessions VALUES ('".$key."',".$expiry.",'".$value."'"); return true; } function sess_destroy($key) { include("oci8.inc"); $db=new DB; $db->connect(); $db->Query("DELETE FROM php_sessions WHERE sesskey = '".$key."'"); return true; } function sess_gc($maxlifetime) { include("oci8.inc"); $db=new DB; $db->connect(); $db->Query("DELETE FROM sessions WHERE expiry < " . time()); return true; } session_set_save_handler("sess_open","sess_close","sess_read","sess_write","sess_destroy","sess_gc"); session_register("toto"); $toto=55; ?> After submitting it, the only thing that display on the IE 5.5 is READ! Why doesn't the session_write function be called ? Regards