|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18168 setcookie() only sets last call
Submitted: 2002-07-04 14:20 UTC Modified: 2002-07-15 20:44 UTC
Avg. Score:5.0 ± 0.0
Reproduced:5 of 5 (100.0%)
Same Version:2 (40.0%)
Same OS:2 (40.0%)
From: robschiffman at imaginaworld dot com Assigned:
Status: Closed Package: Apache2 related
PHP Version: 4CVS-2002-07-04 OS: Windows 2000 Server
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: robschiffman at imaginaworld dot com
New email:
PHP Version: OS:


 [2002-07-04 14:20 UTC] robschiffman at imaginaworld dot com
Calling setcookie multiple times only sets the last cookie "second".



show results:

use javascript:alert(document.cookie); in URL to verify.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-04 14:51 UTC]
Exactly what version of PHP you have? (look that in phpinfo() output) And apache2?

 [2002-07-04 15:59 UTC] robschiffman at imaginaworld dot com
PHP Version: 4.2.2-dev
Apache Version: 2.0.39
 [2002-07-04 16:17 UTC]
AFAIK, if you use the latest CVS HEAD of PHP and Apache, this will work.

 [2002-07-04 16:40 UTC] robschiffman at imaginaworld dot com
My version is latest STABLE from
which I'm assuming is the most recent build from CVS, correct?
 [2002-07-04 16:52 UTC]
No, it's not the latest. The snapshots without 'stable' text in them are. (and with text 'latest').

But unfortunately the binary snapshots are not build
with latest Apache2 so..

 [2002-07-15 20:44 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.

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Dec 08 00:05:52 2022 UTC