ID: 20583 User updated by: jseverson at myersinternet dot com Reported By: jseverson at myersinternet dot com Status: Open Bug Type: Session related Operating System: RedHat 7.2 PHP Version: 4CVS-2002-11-22 (stable) New Comment:
On that same note, we have now rolled back all our servers to an older version of php as this was bug was becoming impossible to work with. Previous Comments: ------------------------------------------------------------------------ [2003-02-26 17:12:10] jseverson at myersinternet dot com Well, unfortunately I have bad news for you. Try using the empty() or isset() functions on your new $_SESSION global variables. My guess is they will always return true regardless of whether or not that variable actually has a value. At least this was my experience when I did the same thing you did, and went through replacing all my session functions. So for instance, in order to replace: session_is_registered("variable") you'd have to do: !empty($_SESSION["variable"]) unfortunately, it always returns true!! ------------------------------------------------------------------------ [2003-02-26 16:07:22] charlesk at netgaintechnology dot com I forgot the session_start(); Still the same behaviour <?php session_start(); $a = 4; $test = $_SERVER["HTTP_REFERER"]; $_SESSION["test"] = $test; $y = 3; $t = 2; $a = 5; echo "$a $t $y"; ?> Output : 5 2 3 <?php session_start(); $a = 4; $test = $_SERVER["HTTP_REFERER"]; session_register("test"); $y = 3; $t = 2; $a = 5; echo "$a $t $y"; ?> Output: 5 2 2 ------------------------------------------------------------------------ [2003-02-26 16:04:14] charlesk at netgaintechnology dot com The first one works, the second one does not. <?php $a = 4; $test = $_SERVER["HTTP_REFERER"]; $_SESSION["test"] = $test; $y = 3; $t = 2; $a = 5; echo "$a $t $y"; ?> <?php $a = 4; $test = $_SERVER["HTTP_REFERER"]; session_register("test"); $y = 3; $t = 2; $a = 5; echo "$a $t $y"; ?> If this is buggy code please tell me how. I ended up going through _EVERY_ site that we host and changing session_register to $_SESSION. Charles Killmer Windows 2000 Server IIS 5.0 PHP 4.3.1 ------------------------------------------------------------------------ [2003-02-09 16:38:22] phpbugs at brianmertens dot com Maybe this is related to the bug #22117 , that I reported yesterday? http://bugs.php.net/bug.php?id=22117 ------------------------------------------------------------------------ [2003-02-04 13:05:49] jseverson at myersinternet dot com Just wanted to check in on this bug and see if any progress has been made...thanks. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/20583 -- Edit this bug report at http://bugs.php.net/?id=20583&edit=1