memcache PHP session handler redundancy
mike
mike503 at gmail.com
Thu Jul 26 03:19:31 UTC 2007
On 7/25/07, Sascha Braun - CEO @ Braun Networks
<sascha at braun-networks.com> wrote:
> The session class I posted here has a single problem which will
> cause that the session will get lost from time to time.
>
> To fix the problem you cave to initialize the handler function
> via session_set_save_handler after the session has been initialized.
>
> The code looks simply like that:
>
> // initialize session management
> $session = new session_mm($_REQUEST);
> session_set_save_handler(array(&$session, "handler_open"),
> array(&$session, "handler_close"),
> array(&$session, "handler_read"),
> array(&$session, "handler_write"),
> array(&$session, "handler_destroy"),
> array(&$session, "handler_garbage"));
>
> Then everything should work fine.
>
ew, please do not suggest using $_REQUEST. :(
More information about the memcached
mailing list