php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42273 Unable to set multiple cookies with a web page
Submitted: 2007-08-11 19:10 UTC Modified: 2007-08-19 01:00 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: dancega at comcast dot net Assigned:
Status: No Feedback Package: Output Control
PHP Version: 5.2.3 OS: Vista Business
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2007-08-11 19:10 UTC] dancega at comcast dot net
Description:
------------
This problem was encountered with php 5.2.3.3

When using setcookie, only the last cookie is output from the server.  Cookies preceeding the last cookie are never sent.

This seems to have been an issue with 4.X but seems to have reoccured.

Reproduce code:
---------------
<?php
echo "begin cookie test";
setcookie('firstcookie','the first cookie');
setcookie('secondcookie',"the second cookie");
echo "  end cookie test";
?>


Expected result:
----------------
When loading the subsequent page in the same browser session I expect to see 

$_COOKIE['firstcookie']
$_COOKIE['secondcookie']

Actual result:
--------------
I see only $_COOKIE['secondcookie']

I never see $_COOKIE['firstcookie']

Note : this is verified in a utility which allows me to examin http headers.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-11 22:30 UTC] jani@php.net
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.



 [2007-08-19 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 05:01:30 2024 UTC