php.net |  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
Votes:1
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
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:
<snip>
<?
setcookie("a", "a123");
setcookie("b", "b623");
setcookie("c", "c233");
setcookie("d", "d143");
?>

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

and viewing the page:

<snip>
<?
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>
</snip>

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.




Patches

Pull Requests

History

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] sniper@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net 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 ?

Koxta
 [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.

Koxta
 [2002-06-11 18:44 UTC] sniper@php.net
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.

/mich
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC