ID: 28966 User updated by: dgoodman at twentythreeg dot net Reported By: dgoodman at twentythreeg dot net -Status: Bogus +Status: Closed Bug Type: Session related Operating System: Debian/Linux 2.6.5 PHP Version: 4.3.7 New Comment:
My apologies... Somehow register_globals was turned on when I could have sworn it was turned off. Sorry to waste your time. Previous Comments: ------------------------------------------------------------------------ [2004-06-30 16:53:23] dgoodman at twentythreeg dot net Certainly seems like a bug to me. I wasn't asking for support. Please explain how this is does not imply a problem with PHP. If I assign a value to the session variable, I don't expect to be able to overwrite the value of that variable with a completely unrelated variable. Please recheck this issue. ------------------------------------------------------------------------ [2004-06-30 09:08:23] [EMAIL PROTECTED] Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. . ------------------------------------------------------------------------ [2004-06-30 00:52:23] dgoodman at twentythreeg dot net Description: ------------ If I save a variable to $_SESSION, for example $_SESSION['varname'] = 'value', and then assign a value to a normal variable of the same name, $varname = 'value2', then the value of the session variable is overwritten with the second value. This is not an issue of assignment by reference -- I assign values, as shown in the code I have provided. The first time the code is executed, the results are correct on my machine. However, on subsequent executions of the code, the results become incorrect. Reproduce code: --------------- <?PHP session_start(); $_SESSION['var'] = 'Foo'; print 'Session.var = '.$_SESSION['var'].'<BR>'; $var = 'Bar'; print 'var = '.$var.'<BR>'; $var1 = $_SESSION['var']; print 'var1 = '.$var1.'<BR>'; ?> Expected result: ---------------- Session.var = Foo var = Bar var1 = Foo Actual result: -------------- Session.var = Foo var = Bar var1 = Bar ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28966&edit=1