#29626 [Fbk->NoF]: Variables read from $_SESSION loose their values when using HTTP

From: Date: Sun, 05 Sep 2004 23:00:08 +0000
Subject: #29626 [Fbk->NoF]: Variables read from $_SESSION loose their values when using HTTP
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-65771@lists.php.net to get a copy of this message
ID: 29626 Updated by: php-bugs@lists.php.net Reported By: proteus at proteusworld dot com -Status: Feedback +Status: No Feedback Bug Type: Session related Operating System: Linux (might be Windows too) PHP Version: Irrelevant New Comment: No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". Previous Comments: ------------------------------------------------------------------------ [2004-08-29 13:35:08] tony2001@php.net HTTP & HTTPS are two different sites for your browser, so you're mixing two different sessions here. Please, supply more readable example - a short reproduce script would definitely help more than a verbose essay. ------------------------------------------------------------------------ [2004-08-12 08:26:48] proteus at proteusworld dot com Description: ------------ I found a strange (to me at least) behaviour with sessions when using HTTPS. Let's say that $_SESSION["message"] contains "old_message". Take the following code: $old_message = $_SESSION["message"]; $_SESSION["message"] = "new message"; echo "The message was: ".$old_message; Now, over HTTP you would get the expected output ("old_message"). But over HTTPS the output will contain "new_message". You can use session_unregister("message") if you want $old_message to preserve its value, but this means you can't set anymore a new value for $_SESSION["message"]. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29626&edit=1

« previous php.bugs (#65771) next »