Re: How do sessions work exactly?
| From: | Jesper Juhl | Date: | Fri, 28 Jul 2000 18:51:04 +0000 |
| Subject: | Re: How do sessions work exactly? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-8836@lists.php.net to get a copy of this message | ||
> > Below I have included some skeletal code for writing your own session
> > functions. I can send you a complete working example that stores session
> > data in a MySQL DB if you like ;-)
> Someone wrote something similar for PostgreSQL. However, if you force
> the _open handler to return false (actually, if you return *every*
> handler function to return false) there is no way to know
> session_register() failed.
> So, when your custom session handling stuff
> works, it works well. When it fails, you won't know.
> See bug #5783.
> --
> albert chin (china@thewrittenword.com)
I tried your example, and you are right. If the handler functions return
false, that information is not passed back to session_start() or
session_register(). So all error handling would have to be done in the
handler functions :-(
It is not possible to do something like
if (!session_register('foo')) {
echo bummer;
}
- Jesper Juhl - juhl@eisenstein.dk