RE: [PHP] One Session ID, Multiple Domains
| From: | John W. Holmes | Date: | Sat, 05 Oct 2002 03:13:16 +0000 |
| Subject: | RE: [PHP] One Session ID, Multiple Domains | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-118928@lists.php.net to get a copy of this message | ||
> Here's the situation: I have an online store. I use sessions to track
> the shopping cart. When I go to checkout and switch to SSL, it's on
> another domain (but still on the same machine). I need to access the
> session data from the non-SSL domain for checkout. How can I go about
> doing this? Passing the session ID through POST and GET didn't work,
PHP
> just ignored it. Any help is greatly appreciated!
How did you pass it and how did you start the new session with it?
I can't get to the manual, but I think you have to use session_name() to
set the name before you call session_start(). You use the session id
passed in GET or POST in the session_name call.
As long as it's on the same box, it should work fine, as PHP will look
in the same place for the session file to load.
---John Holmes...