note 19563 added to function.session-set-save-handler
| From: | vrg at cmt dot hu | Date: | Mon, 04 Mar 2002 07:57:56 +0000 |
| Subject: | note 19563 added to function.session-set-save-handler | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-27307@lists.php.net to get a copy of this message | ||
I just want to mention, that it's critical to return a string value with the read function,
because there can be strange errors if - for example - the return value is null. In my case the php
program stopped in the middle of an "echo" command, so it was really hard to find, that
the real problem was with that session read callback function.
The easyest way to handle this, that you should cast the return value before return. For example:
function read ($id) {
/* code here to produce $retval */
return (string)$retval;
}
--
http://www.php.net/manual/en/function.session-set-save-handler.php
http://master.php.net/manage/user-notes.php?action=edit+19563
http://master.php.net/manage/user-notes.php?action=delete+19563
http://master.php.net/manage/user-notes.php?action=reject+19563