php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11052 cookie problem
Submitted: 2001-05-23 08:22 UTC Modified: 2001-05-23 08:29 UTC
From: dmsales at design-monster dot com Assigned:
Status: Not a bug Package: HTTP related
PHP Version: 4.0.5 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dmsales at design-monster dot com
New email:
PHP Version: OS:

 

 [2001-05-23 08:22 UTC] dmsales at design-monster dot com
I am rather sure this isn't a php bug.  So lets not get unfriendly about it.  But i have asked over and over in other places with out an answer.  at least point me in the right direction.  please

I have set up a user login so that it will assign a cookie for one hour -
setcookie("cookie_id", $id, time()+3600);

The manner in which i suse the expiration is copied form the manual but i have actually tried several alteratives.  The problem is the expiration works perfectly locally (i am running apache 1.3 for windows)  but once i upload it (linux red hat 5.2 (why so old i dont know)/ apache 1.3.19.)  The expiration will not work on my browser(s) unless i increase the expiration to +5000 or above.  My client tests it using the same version of IE i have and it will not set the cookie still at +5000 for him.  

Now i understand from browser to browser there can be differences but why can i set a cookie for +200 locally but not for less than +5000 uploaded when i am most certainly checking it with the same browser (IE 5.5)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-23 08:27 UTC] rasmus@php.net
Perhaps because the clock on that server you are uploading to is off, or maybe your clock is off.  And you are right, this is not a PHP bug.  Fix you clock or encode the server's timestamp in the cookie and check that when it gets the cookie back to determine if it should still be valid.
 [2001-05-23 08:29 UTC] zak@php.net
Your server and your local machine likely have different system times.

Ask your question on the general mailing list and I will give you an answer.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Feb 25 19:01:24 2021 UTC