Re: HTTP_SESSION_VARS

From: Date: Thu, 08 Nov 2001 16:06:29 +0000
Subject: Re: HTTP_SESSION_VARS
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-73901@lists.php.net to get a copy of this message
> I am working on a major PHP project using sessions and would like to run > PHP with register_globals turned off. Trouble is, with PHP-4.0.6 I lose > all the session variables and my program breaks. Tried - > > > $username = $HTTP_SESSION_VARS['username']; > print $username; > > and got nothing. > > print_r($HTTP_SESSION_VARS) shows an empty array. Is this a bug in > 4.0.6. Try calling session_start(); before trying to grab the session variables, on each page that needs to use the variables. * Chris O'Brien (clobrien@excel.net) * Excel.Net,Inc. - http://www.excel.net/ * (920) 452-0455 - Sheboygan/Plymouth area * (888) 489-9995 - Other areas, toll-free

« previous php.general (#73901) next »