Re: msession - giving me a hard time
| From: | CPT John W. Holmes | Date: | Mon, 17 Nov 2003 16:16:08 +0000 |
| Subject: | Re: msession - giving me a hard time | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-169959@lists.php.net to get a copy of this message | ||
From: "Guillaume Dupuis" <guillaume.dupuis@sand.com>
> This works. My second page has the suffix '?PHPSESSID=e6t9tu43j9tj39j...',
> that matches the 'echo $sessid' I've added to your script above, so this
> part did work. But to test it, I do this in my second page:
>
> <?php
> session_start();
> $sessid = session_id();
> echo $sessid;
> ?>
>
> $sessid does echo a session_id... but not the one as the one I passed
> it!!?!?! And I do see the right SID in the Address bar!
No reason that shouldn't be working. Let's help out PHP a little more...
<?php
session_id($_GET['PHPSESSID']);
session_start();
echo sesson_id();
?>
Try that. You're telling PHP to use the session id passed in the URL (which
it should do by default, anyhow) by calling the session_id() function before
session_start().
Are you clearing your cookies while doing all of this? session_start() on
the second page may be picking up an old cookie instead of picking up the
value in the URL...
---John Holmes...