ID: 20583 Updated by: [EMAIL PROTECTED] Reported By: jseverson at myersinternet dot com -Status: Open +Status: Feedback Bug Type: Session related Operating System: RedHat 7.2 PHP Version: 4CVS-2002-11-22 (stable) New Comment:
What is your php.ini setting for session.bug_compat_42 ? Does turning that on/off change anything? Previous Comments: ------------------------------------------------------------------------ [2003-03-13 00:12:36] junkmail-trash at int0rnet dot net I'm seeing this as well, on PHP 4.3.0 on Darwin -- it's definately related to sessions. My boss keeps asking why we aren't using Cold Fusion for this project. I'm starting to have trouble coming up with a good answer to keep using PHP.. ------------------------------------------------------------------------ [2003-02-26 17:12:56] jseverson at myersinternet dot com 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. ------------------------------------------------------------------------ [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-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 ------------------------------------------------------------------------ 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