ID:               16803
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Feedback
 Bug Type:         Apache2 related
 Operating System: RedHat 7.2
 PHP Version:      4.2.0
 New Comment:

Please _search_ bug db first.
There are sevral reports for this.

I appreciate if you could search and comment bug # that is active for
this bug, then change status to Duplicate.

Thank you.


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

[2002-04-24 14:09:53] [EMAIL PROTECTED]

(Also see Bug #16626)

Bug #16626 explains that when using setcookie() with PHP 4.2.0 and
Apache 2.0.35, only the LAST call to setcookie() will be actually sent
in the HTTP headers -- all previous calls/cookies will be ignored and
not sent.

This bug expands on this by discovering that the same problem affects
the header() call.

For example, try running the following test script in PHP 4.2.0 and
Apache 2.0.35:

--

<?php

// Only "three=three" will get sent!

header("Set-Cookie: one=one");
header("Set-Cookie: two=two");
header("Set-Cookie: three=three");

// These will both be sent unharmed.

header("Set-Monkey: eep");
header("Set-Fish: glug");

// Location gets sent fine...

header("Location: http://www.panic.com/";);

?>

--

You can verify that ONLY the last cookie ("three") is being sent by
either turning on per-cookie ask in your browser, or running a packet
sniffer and looking at the HTTP response. In the example above, the
HTTP headers look like:

[...]
X-Powered-By: PHP/4.2.0
Set-Cookie: three=three
Set-Money: eep
Set-Fish: glug
Location: http://www.panic.com/
Content-Length: 0
[...]

Thanks for looking into this!


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


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

Reply via email to