Bug #11068 Updated: cookie lost after redirect header(Location:);

From: Date: Wed, 23 May 2001 23:19:05 +0000
Subject: Bug #11068 Updated: cookie lost after redirect header(Location:);
Groups: php.dev 
Request: Send a blank email to php-dev+get-56560@lists.php.net to get a copy of this message
ID: 11068 User Update by: mike@kristopeit.com Status: Bogus Bug Type: *Session related Operating system: win98 PHP Version: 4.0.5 Description: cookie lost after redirect header(Location:); this isn't a support question, it is a demonstration of a repeatable bug! Previous Comments: --------------------------------------------------------------------------- [2001-05-23 18:51:46] sniper@php.net Ask support questions on php-general@lists.php.net --------------------------------------------------------------------------- [2001-05-23 18:23:58] mike@kristopeit.com take these 3 scripts: include.php ======================== $value = 1; $boolean = $session[0]; if($boolean) $value = 0; ======================== script1.php ======================== include("include.php"); setcookie("session[0]","1",0,"/","",0); header("Location: /script2.php"); ======================== script2.php ======================== include("include.php"); echo $value; ======================== now here is the problem... i run script one, it includes "include.php" and sets the cookie and redirects to "script2.php", but i don't think script2.php is including "include.php" again after the cookie set. these aren't the real scripts i am testing this on, but something very similar. is there a problem with this sequence: script1: >include("file"); >header("Location: script2"); script2: >include("file"); thanks --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=11068

« previous php.dev (#56560) next »