ID:               42791
 Comment by:       dron007 at inbox dot ru
 Reported By:      dron007 at yahoo dot com
 Status:           Feedback
 Bug Type:         Session related
 Operating System: Linux
 PHP Version:      5.2.4
 New Comment:

Yes, that was IE6. With FF and Opera everything works fine. Probably
that is browser issue but it is very weird thing because if I add
another session variable that is not nulled IE shows this variable and
doesn't show nulled one. FF shows both of them. That means that session
cookie is sent in both cases.

Also if I move 
$_SESSION["some_var"] = null;
inside "if" statement it works fine too.


Previous Comments:
------------------------------------------------------------------------

[2007-09-29 02:36:46] [EMAIL PROTECTED]

With what browser are you trying this with? IIRC, there was some issue
with IE and broken html and it not sending some headers then. 

------------------------------------------------------------------------

[2007-09-28 17:55:24] dron007 at yahoo dot com

Description:
------------
There was the bug already posted: http://bugs.php.net/bug.php?id=25966

I also have the similar situation. IMG tag with empty src attribute
deletes session variable. Yes, it is incorrect <IMG> tag but I spent a
lot of time debugging this situation and I was very surprized that HTML
code have an influence on PHP variables.



Reproduce code:
---------------
File 1.php:
<?
session_start();
$_SESSION["some_var"] = null;

if (isset($done)) {
  $_SESSION["some_var"] = 1;
        
  header("Location: 2.php");
  die();
}
?>

<a href="1.php?done=1">Goto 2</a>
---------------------------------------
File 2.php:
<?
session_start();
echo 'some_var='.$_SESSION["some_var"].'<br>';
echo '<img src="">';
?>

Expected result:
----------------
I first load file 1.php, then go by link which sets session variable,
then I see "some_var=1" which is correct.

If I reload 2.php I expect to see "some_var=1"


Actual result:
--------------
"some_var="

Session variable is destroyed.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=42791&edit=1

Reply via email to