|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17410 setcookie only registering once
Submitted: 2002-05-24 09:30 UTC Modified: 2002-06-11 18:44 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: mich at php dot dk Assigned:
Status: Closed Package: Apache2 related
PHP Version: 4.2.1 OS: FreeBSD 4.5-RELEASE
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: mich at php dot dk
New email:
PHP Version: OS:


 [2002-05-24 09:30 UTC] mich at php dot dk
'./configure' '--with-apxs2=/usr/local/sbin/apxs' '--with-
tsrm-pth' '--with-config-file-path=/usr/local/etc' '--
enable-versioning' '--with-regex=system' '--without-gd' '--
without-mysql' '--with-gd=/usr/local' '--enable-gd-native-
ttf' '--with-freetype-dir=/usr/local' '--with-jpeg-dir=/
usr/local' '--with-png-dir=/usr/local' '--with-zlib' '--
with-pgsql=/usr/local' '--enable-ftp' '--with-curl=/usr/
local' '--prefix=/usr/local' 'i386-portbld-freebsd4.5'

When doing the following test:
setcookie("a", "a123");
setcookie("b", "b623");
setcookie("c", "c233");
setcookie("d", "d143");

<a href="p2.php">Page 2</a>

and viewing the page:

echo $HTTP_COOKIE_VARS["a"]."<br>";
echo $HTTP_COOKIE_VARS["b"]."<br>";
echo $HTTP_COOKIE_VARS["c"]."<br>";
echo $HTTP_COOKIE_VARS["d"]."<br>";
<a href="p1.php">Page 1</a>

only the last cookie is echo'ed. When running on php 4.1.1 
all four cookies are echo'ed. When looking in my cookies 
folder only one cookie has been set.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-24 09:34 UTC] mich at php dot dk
Ohh  - yeahh .. It is compiled as a module for apache2
 [2002-05-24 10:08 UTC]
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at In case this was a documentation 
problem, the fix will show up soon at
In case this was a website problem, the change will show
up on the site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.

 [2002-06-11 14:51 UTC] koxta at tha dot one dot pl
Hmm... I didn't find anything new about that bug since 24 May. How to avoid it ?

 [2002-06-11 15:57 UTC] koxta at tha dot one dot pl
I have just installed the newest snapshot of PHP 4.2.2-dev (11.06.2002) with apache 2.0.36. Unfortunately, it didn't give any positive results for setcookie() problem.

 [2002-06-11 18:44 UTC]
Latest NON-stable snapshot has the fix.

 [2002-06-12 03:31 UTC] mich at php dot dk
Yeah - well latest UNSTABLE version would not compile on my 
system. And since I really needed a functioning setcookie 
function - I diff'ed the ext/standard/head.c - and took the 
changes from UNSTABLE and ported to STABLE.

It worked just fine.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 13 17:01:30 2024 UTC