ID:               27478
 Updated by:       [EMAIL PROTECTED]
 Reported By:      sambukkaa at hotmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: Windows
 PHP Version:      5.0.0b4 (beta4)
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Use session_write_close() after you set the session variable to flush
out the data.


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

[2004-03-03 05:24:13] sambukkaa at hotmail dot com

Description:
------------
PHP doesn't wait for the child to finish execution but incase of
sessions it is critical.

To test it you need to create 2 files as followed:



file 1: main.php

file 2: sub.php



Reproduce code:
---------------
file 1: main.php

<html><head><title>file name: main.php</title></head><body>

<?$_SESSION['var']=1;

"echo The session variable ist set to ". $_SESSION['var'] ."</br>";?>

<p><a href="sub.php" target="_blank"">call the sub.php file that opens
the session variable &quot;var&quot; with the  value 1, but:</a>

<?// PHP doesn't wait for the child to finish execution!

$_SESSION['var']=0;?>

</body>

</html>

file 2: sub.php

<?$text="You have opened the sub.php file, receiving a session variable
'var' which shuld have the value of 1 but  _SESSION['var']=".
$_SESSION['var'];

echo $text;?>

Expected result:
----------------
It MUST show the real value (1) before changing it to 0. you can test
it on my server too: http://motion4u.sytes.net/phptest/main.php 



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


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

Reply via email to