Re: Session management module - thoughts
| From: | Jim Winstead | Date: | Fri, 28 May 1999 19:33:25 +0000 |
| Subject: | Re: Session management module - thoughts | ||
| References: | 1 2 3 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-6201@lists.php.net to get a copy of this message | ||
On May 28, Sascha Schumann wrote:
> On Fri, May 28, 1999 at 02:31:10PM -0400, Jim Winstead wrote:
> > On May 28, Sascha Schumann wrote:
> > > int session_start(string zone_path [, string CookieName [, string Id]]);
> >
> > I'm a little worred about the use of optional parameters here --
> > the problem is that to get at some of them, you're forced to deal
> > with ones you might not want to otherwise. I think we're better
> > off putting the zone_path and cookie_name ones into seperate little
> > functions (ie. session_cookie_name and session_save_path -- these
> > should return the current setting as well as taking an optional
> > argument to set them).
>
> Ok, I agree. About the serialization stuff - is the code in var.c capable of
> doing the necessary things?
I'm not sure. The tricky bit is going to be dealing with objects,
although I suspect this will be easier to handle in PHP4 (since
you have access to the classname in the object, at least).
> > Some other functions to add:
> >
> > string session_id([string id]) -- get/set the current session id
> >
> > string session_encoded(int id) -- session as one big string
> > suitable for storing someplace (and we probabaly want this
> > to be safe for SQL queries and such, so people don't have
> > to call addslashes() on it)
>
> Well, addslashes introduces extra overhead to the whole process which might
> not be necessary. If someone wants to write his own I/O functions for session
> data, he should be able to add one addslashes call (or turn on
> magic_quotes_*).
Fair enough. My main concern is that it behave consistently so
people can just package up a session_foo.php3 that people can
require() or auto_prepend.
> > register_session_saver(string function) -- obvious, although
> > a better word than "saver" would be nice. :)
>
> writer? Sounds better than saver.
Works for me, although maybe the complement should then be
register_session_reader.
Jim
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net