Re: Sessions question (-enable-trans-sid)
| From: | Martin Clifford | Date: | Wed, 05 Jun 2002 17:09:31 +0000 |
| Subject: | Re: Sessions question (-enable-trans-sid) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-100781@lists.php.net to get a copy of this message | ||
I'm sure this is not a definitive answer, but I would assume that since you would be passing
the information through both the URI and Cookies, it will work regardless of cookies enabled or
disabled. On the other hand, if you are passing the session id through the URI in the first place,
you don't have to worry about cookies being on at all. Just some idle speculation, I've
never tried to use both at the same time.
Martin
>>> "Jeff Field" <jfield@aaaq.com> 06/05/02 12:56PM >>>
Hi,
I'm confused about one thing regarding sessions and haven't been able to
find the definitive answer anywhere. Hopefully, I can here.
There are two ways to enable sessions:
1) Session ID is passed through cookies
2) Session ID is passed through the URL, either done manually or by
automatic URL rewriting
All the books, tutorials, etc. basically say that cookies are the way to go
but "when users don't have cookies enabled, you have to use the URL method".
Since I have an e-commerce site that is available to the world, I'm assuming
*some* are not going to have cookies enabled. Duh!
So, from what I've read, you can implement the URL method of sessions by
either manually attaching the session ID to the URLs, or, by compiling PHP
with enable-trans-sid, which will add the session ID to the URL's
automatically. The answer that I haven't been able to find is this:
Is this a one or the other proposition? IOW, if I implement sessions with
cookies, then I can't use the URL method? Or, if I implement the URL method
(with enable-trans-sid), I can't use the cookie method? Or, do they work in
combination. IOW, does PHP automatically know that if a user has cookies
enabled, PHP will use the cookie method and, when cookies are *not* enabled,
PHP automatically implements the URL method?
Thanks for the help!
Jeff
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php