ID:               20776
 User updated by:  [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Feedback
+Status:           Open
 Bug Type:         Session related
 Operating System: Win2K Server
 PHP Version:      4.2.3
 New Comment:

Hi Sniper,

I'll wait until an RC3 eventuates, rather than trying to build this
right now.

In addition to this morning's message, I have now discovered that part
of my frustration was that there were TWO bugs in PHP-4.2.3 in the same
piece of login script code!

1. session_register() is apparently quirky, as stated earlier.
2. The one I just discovered is that header() is apparently also
broken. I had already mentioned a different behaviour depending on the
way the URL is included (see original message in this report) but have
just isolated that header() is evidently not doing enough to ensure the
browser knows it has been redirected.

This will have unreliable results:
header("Location: $CFG->wwwroot/index.php");

This will not:
redirect("$CFG->wwwroot/index.php");

function redirect($url, $message="", $delay=0) {
/* redirects to a new URL using meta tags */
        echo "<meta http-equiv='Refresh' content='$delay; url=$url'>";
        if (!empty($message)) echo "<div style='font-family: Arial,
Sans-serif; font-size: 12pt;' align=center>$message</div>";
        die;
}

Ignoring the fancy formatting if you can, it looks like header() isn't
flushing the browser.

Hope this helps.


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

[2002-12-08 22:43:41] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip



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

[2002-12-08 22:34:50] [EMAIL PROTECTED]

Iliaa,

My reply of 2 Dec 9:17pm contains a small script which demonstrates
this fault. Don't know what else you want here. If you run this, you'll
see "Dead session!!". Thus either session_register() or isset() is
misbehaving compared to versions prior 4.2.3

<?

session_start();
session_register("SESSION");

if (! isset($SESSION)) { echo("Dead session!!<br>"); }

?>

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

[2002-12-07 01:24:07] [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".

Thank you for your interest in PHP.


Please use $_SESSION autoglobals rather then register_session to assing
values to the session & if the problem persists please include a SMALL
script in your reply.

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

[2002-12-04 20:40:02] [EMAIL PROTECTED]

"If a man isn't a socialist at 20, he has no heart; if he is
still a socialist at 40, he has no mind."

Rob

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

[2002-12-04 05:12:40] [EMAIL PROTECTED]

hmm... maybe Sniper should start charging for support then; he would
make a very decent living out out it with all the time he spends on
verifying bugs and trying to help people with bugs. 

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

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

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

Reply via email to