#16626 [Com]: Only last cookie set
| From: | jgillap at cogeco dot ca | Date: | Mon, 16 Sep 2002 10:51:29 +0000 |
| Subject: | #16626 [Com]: Only last cookie set | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-19432@lists.php.net to get a copy of this message | ||
ID: 16626
Comment by: jgillap@cogeco.ca
Reported By: svein.olav@bjerkeset.com
Status: Closed
Bug Type: Apache2 related
Operating System: All
PHP Version: 4.2.1
New Comment:
This bug happens anytime I install a bulletin board built for php..
Runnning under WindowsXP PHP Version 4.2.1 using foxserv v3 beta 5...
Any bulletin board system when a user or admin tries to move around the
cookie isn't saved or something.. So you can login to any forum but as
soon as you move to another page your logged out... Very annoying bug
as you can't even make it to the admin of your bulletin board to see
whats going on. I spent several hours trying to find the root of this
problem..
I have no fix..
Previous Comments:
------------------------------------------------------------------------
[2002-07-23 19:55:48] surge0@yahoo.com
After digging around a bit:
in "sapi_apache2.c", in php4 source code, under /sapi/apache2filter,
line 102-103 is:
else if (sapi_header->replace)
apr_table_set(ctx->r->headers_out, sapi_header->header, val);
It appears this is triggered with the "Set-Cookie:" header, as if line
103 is changed to
apr_table_add(ctx->r->headers_out, sapi_header->header, val);
multiple cookies appear to work fine (but I'm sure something else
breaks).
------------------------------------------------------------------------
[2002-06-27 21:50:34] tsuzman@attbi.com
reinstalled php 4.2.2-dev (binary from snaps.php.net; june 27 stable
build) with apache 2.0.39 on windows xp. Bug is still here: only the
last cookie is set.
------------------------------------------------------------------------
[2002-06-20 18:47:18] sniper@php.net
------------------------------------------------------------------------
[2002-06-20 14:55:19] marcum@austin.rr.com
I downloaded the latest cvs snapshot (php4.3 on 06/20) from
http://snaps.php.net/ and compiled with apache 2.0.39. The
setcookie
function seems to be working in that release.
------------------------------------------------------------------------
[2002-06-20 10:03:18] red@tripany.com
Well after extensive testing, I have to conclude it's probably not a
php (alone) problem.
I have tried:
PHP ver. Apache ver. --enable-so works? error
---------------------------------------------------------
4.2.1 2.0.39 yes no yes
2.1 36 yes yes no
2.0 39 yes no yes
2.0 36 no no yes
2.0 36 yes yes no
4.0.3pl1 1.3.9 ? yes ?
(4.0.3pl1 is the standard debian package)
The rest of the 2.1 installations (with apache 39) don't work and give
errors, so there's some problem with the apxs interaction between php
and httpd 2.0.39. As php2.1.0 works with httpd 2.0.36 I'm now assuming
there was a change in the apxs of apache in the security fix version
which renders the multiple cookies unwriteable. I'll send this off to
apache as well.
Cheers
Robin
------------------------------------------------------------------------
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/16626
--
Edit this bug report at http://bugs.php.net/?id=16626&edit=1