note 27153 added to function.session-set-save-handler
| From: | ivo at magstudio dot net | Date: | Mon, 25 Nov 2002 13:08:24 +0000 |
| Subject: | note 27153 added to function.session-set-save-handler | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-39945@lists.php.net to get a copy of this message | ||
Just a few words to explain some troubles while using session_set_save_handler(). It appears that
internally PHP calls session management functions in this order: open(), read(), write(), close().
Close() function is called even if you does not make a call to sesison_start(), perhaps for some
reasons like cleaning.
If you try to redefine these functions and call sessions_set_save_handler() but something
doesn't work, (in my case the ssion data hasn't been written) it's a good idea to
debug them in the order they are called. They doesn't produce error output to browser but you
can use print or echo.
Shortly, if your write() function doesn't work as expected take a look for errors in
previous functions - open() and read().
I hope that this will help to save someone few hours debugging.
--
http://www.php.net/manual/en/function.session-set-save-handler.php
http://master.php.net/manage/user-notes.php?action=edit+27153
http://master.php.net/manage/user-notes.php?action=delete+27153
http://master.php.net/manage/user-notes.php?action=reject+27153