Re: PEAR Session Class
| From: | Paul DuBois | Date: | Thu, 08 Nov 2001 22:09:52 +0000 |
| Subject: | Re: PEAR Session Class | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-490@lists.php.net to get a copy of this message | ||
At 5:04 PM +0100 11/8/01, Martin Jansen wrote:
On Thu, 08 Nov 2001 10:31:11 -0500, wendat67@mercure.net wrote:What do you see as the difficulties with session_set_save_handler()? My own answer to that question would be that if the set of handlers need to share global information (such as a database connection identifier for a database-backed storage module), you end up polluting the namespace of your scripts not only with the handler function names but with any global variables you define. I've written a class-based MySQL storage module so that "globals" could be just object members and not visible in global scope. But the only way I could figure out how to get the handler functions defined in the class and still be able to pass them to session_set_save_handler() was to define them inside the class constructor and call session_set_save_handler() later on in the constructor. But I don't know if that's how I should have done it, or whether it's just an accident that it worked.At 10:44 PM 11/9/01 +0700, Ahmad Munif wrote:http://sourceforge.net/projects/pearsession/ I just had a quick look at it: This thingie provides a set of functions that connect to a database via PEAR::DB instead of using the files for saving session data. I think this is a nice start, but in order to be more flexible, there should be the possibility to define other containers in an easy way. - MartinWhy PEAR package not include session class ? i need session to my page. i'm confused, is it important to build session class or just type session_start() for all my page ?Maybe this is what you looking for