mine is alot simpler and works fine, try this.
<?php
session_start();
if (!isset($HTTP_SESSION_VARS['SessionID']))
{
$SessionID = mtime();
session_register('SessionID');
}
?>
--
Chris Lee
Mediawaveonline.com
em. [EMAIL PROTECTED]
ph. 250.377.1095
ph. 250.376.2690
fx. 250.554.1120
"Doug Budny" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm having a strange problem with sessions, it appears that they are not
> propagating to the next page. When I run the login page the sess vars get
> registered, the session_id() get's set, and the cookie sessId get's
> set. However when I go to the order page in a subdirectory only the
cookie
> sessId comes over correctly. It will not set the session_id(). The only
> thing that prints as expected is the cookie var and $sessionId.
>
> I'm using 4.0.4pl1 on Redhad 6.2 apache 1.3.9 . enable_track_vars is
> enabled and so is register_globals. Am I doing something wrong or is
> Sessions broken in pl1?
>
> <?php
>
> // login page
>
> srand((double)microtime()*1000000);
> $sessionId = md5(uniqid(rand()));
> session_id($sessionId);
> session_start();
> setcookie("sessId", $sessionId);
>
> session_register('clientid');
> session_register('clientname');
> session_register('rnum');
>
> ?>
>
>
> <?php
>
> // order page
>
> $sessionId = $HTTP_COOKIE_VARS['sessId'];
>
> session_id($sesssionId);
> session_start();
>
>
> //global $clientname;
> //global $clientid;
>
> echo ('<br>Client ID :' . $clientid);
> echo ('<br>Rnumber :' . $rnum);
> echo ('<br>SessCli Name :' . $HTTP_SESSION_VARS['clientname']);
>
> echo ('<br>Session_Id() :' . session_id());
> echo ('<br>Session_name() :' . session_name());
> echo ('<br>sessId :' . $HTTP_COOKIE_VARS['sessId']);
>
> ?>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]