ID:               15884
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Feedback
 Bug Type:         Session related
 Operating System: Linux
 PHP Version:      4.1.2
 New Comment:

Sorry but currently I am unable to provide a backtrace. Maybe anyone
who stumbled over this bug and has a bit of time can provide one ?

(Also I forgot my bug-password, beat me)

Jochen


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

[2002-03-26 21:48:24] [EMAIL PROTECTED]

To properly diagnose this bug, we need a backtrace to see what is
happening behind the scenes. To find out how to generate a backtrace,
please read http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open".

Could you try to get backtrace?
I guess PHP is segfaulting.

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

[2002-03-11 10:15:00] [EMAIL PROTECTED]

Yup looks like the two are related. The other bug was submitted an Mar
6th, I submitted mine on Mar 5th so at least the dupe is not my fault
;)

Jochen

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

[2002-03-08 15:08:30] [EMAIL PROTECTED]

I believe this bug is related to bug #15909
(http://bugs.php.net/bug.php?id=15909)

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

[2002-03-06 12:25:09] [EMAIL PROTECTED]

> You must provide short & complete script.
> It sounds like your bug to me.

Well this issue is very to reproduce so I thought providing a script
wont be necessary. Anyway the following set of scripts will expose the
bug.

Please note that including the session handler will not be necessary if
you are not running user-defined session handlers (php.ini setting)

An explanation on how to use the scripts is below

-----------------
file: include.php

<?
if (!$pgsql_session_table)
include("/path/to/pgsql_session_handler.php");

session_start();
?>
-----------------
file: t1.php

<?
include("include.php");
$myvar = "hello";
session_register("myvar");
?>
<A HREF="t2.php">t2</A>
-----------------
file: t2.php

<?
include("include.php");
echo "myvar: $myvar<BR>";
?>
<A HREF="t3.php">t3</A>
-----------------
file: t3.php

<?

include("include.php");
session_unregister("myvar");
header("Location: t2.php");
?>
<A HREF="t2.php">t2</A>
-----------------


Observed behaviour:

t1 registers $myvar and displays link to t2. Follow this link
t2 shows value of $myvar and displays link to t3. Follow this link
t3 unregisters $myvar and uses header("Location: ") to redirect you to
t2
t2 shows value of $myvar - it is still "hello"

The behaviour in the last step is incorrect - since $myvar was
unregistred, its value should have been deleted from the session but
obiously is not


When you comment out the line starting with "header" in t3.php and do
the first two steps above and then click the link t3 shows $myvar will
get unregistred properly. This is why the bug has the title
"session_unregister does not work when followed by header("Location:
...")"


btw: The reason for this is not the session-handler I use, php simply
does not call the "pgsql_session_write" function if session_unregister
is followed by a header("Location: ...") statement.


best regards,

Jochen

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

[2002-03-06 03:04:01] [EMAIL PROTECTED]

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".


You must provide short & complete script.
It sounds like your bug to me.

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

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/15884

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

Reply via email to