#33862 [Opn->Bgs]: Cookie doesnot work
| From: | rasmus@php.net | Date: | Tue, 26 Jul 2005 07:37:37 +0000 |
| Subject: | #33862 [Opn->Bgs]: Cookie doesnot work | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-82443@lists.php.net to get a copy of this message | ||
ID: 33862
Updated by: rasmus@php.net
Reported By: phoenixheart at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Session related
Operating System: RedHat Linux
PHP Version: 4.4.0
New Comment:
99% likely that the times on the server and the machines you tested
this on were out of synch. Relying on users to have their clocks set
accurately for short-timeout cookies like this is a bad idea. Use a
session-cookie or a longer-range cookie and embed the actual timeout
based on your server's time into the cookie value itself.
Previous Comments:
------------------------------------------------------------------------
[2005-07-26 09:05:41] phoenixheart at gmail dot com
Description:
------------
setcookie() doesnot function on several machines if 3rd parameter is
presented;
Reproduce code:
---------------
setcookie("myCookie","myValue",time() + 3600);
Expected result:
----------------
A cookie named "myCookie" should be created.
Actual result:
--------------
No cookie with name "myCookie" was created. If 3rd param (time() + 3600
or other variable) was presented, then th eabove snip of code does work
well.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33862&edit=1