Re: Going backwards with sessions.

From: Date: Wed, 14 Feb 2001 00:23:55 +0000
Subject: Re: Going backwards with sessions.
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-39537@lists.php.net to get a copy of this message
I dont have to call session_register() on every page, should have to, just call session_start() thats it. -- Chris Lee Mediawaveonline.com em. lee@mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 "Michael McGlothlin" <mmcglothlin@travel-italy.com> wrote in message news:3A89CDA8.4010402@travel-italy.com... > I think you might need to session_register () the variables on each page > you want to use them, not just once per session. > > Doug Budny wrote: > > > 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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#39537) next »