RE: [PHP] Something is wrong with my sessions..

From: Date: Fri, 19 Jul 2002 14:40:44 +0000
Subject: RE: [PHP] Something is wrong with my sessions..
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-108515@lists.php.net to get a copy of this message
I think I narrowed down the problem, but I have another question: In apache, my server name is online-leagues.com, www.online-leagues.com is aliased to it. I isolated the code in a different script: http://www.online-leagues.com/leagues/loginme.php returns valid if on the subsequent page I take out the www., it returns invalid.. how do I make my session valid entirely across the site? I can't pass anything to session_start(), and I can't see any other function where I would set this.. I'm not sure if this is even the problem anyway, as when I was testing before, www. was in front of all my URLs.. I would login to my site (http://www.online-leagues.com/my), get authenticated, refresh the page.. I'm all good. I type that same URL in the browser.. poof. Since I'm not specifitying a filename (letting apache grab index.php since I'm just specifiying a directory), would that cause a problem with the www. stuff? Sorry if that is confusing/if I'm doing a poor job explaining.. Thanks, Chad -----Original Message----- From: Chad Day [mailto:cday@atpco.com] Sent: Friday, July 19, 2002 10:25 AM To: Rasmus Lerdorf Cc: php-general@lists.php.net Subject: RE: [PHP] Something is wrong with my sessions.. Yes, I do, I mistyped when I was putting the message in. if ($row = mysql_fetch_array($finduser)) { // process login $VALID_USER = '1'; session_register("VALID_USER"); ... ... } else { $FAILED = '1'; } -----Original Message----- From: Rasmus Lerdorf [mailto:rasmus@php.net] Sent: Friday, July 19, 2002 10:09 AM To: Chad Day Cc: php-general@lists.php.net Subject: Re: [PHP] Something is wrong with my sessions.. > login.php: > > session_start(); > > (logic) > > $VALID_USER = '1'; > session_register("OL_VALID_USER"); What's the point of doing a session_register on OL_VALID_USER when you do not set this variable in login.php? Is it coming in via some other mechanism? -Rasmus

« previous php.general (#108515) next »