Re: Session management module - thoughts
| From: | David Fallon | Date: | Sat, 29 May 1999 00:21:57 +0000 |
| Subject: | Re: Session management module - thoughts | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-6224@lists.php.net to get a copy of this message | ||
> I think we should concentrate on writing an API that will be suitable for
> most situations. Something you could easily throw in and add session
> support to your pages without having to go through documentationa and
> trials and errors. After all, ASP's session API is extremely simplstic,
> and I've yet to see anybody that had any complaints about it. ASP's
> session API, as far as I know, is equivalent to this:
>
> session_start();
> session_variable($var);
> session_end();
>
> You don't need to use results or session handles (there can be just one
> session), you don't need to worry about cookies, you don't need to tell it
> where to save its information. You use it, simply, and it works. And
> even the most programming-disabled webmaster can figure out how to use
> this API. Even though this sounds like a marketing-oriented way to say
> things, I really think that it'll suit over 99% of the cases of session
> management. Again, it works for ASP.
If you're going with the simple ASP mechanism, please make sure that there's
some way of registering a page or a function (probably a function is best)
for "on_session_failure", i.e., you can't set/retrieve cookies for whatever
reason. Not having this ability in ASP is a nightmare, as if you want to use
their session object, you have to either guarantee that all client browsers
will have cookies enabled, or say screw you to a significant percentage of
users out there. Having that page or function means you can explain easily,
no matter where the session starts on a site, that the user needs to have
cookies enabled. :) This will make sure it works for 99.999% of the cases.
Also, a way of doing querystring sessions would be *great*. :) Certainly
don't worry about that to begin with, but having that fallback is the only
way to get 100% session success.
--
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