php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14345 cookies
Submitted: 2001-12-04 17:15 UTC Modified: 2001-12-04 17:17 UTC
From: narcotic at labs dot gr Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.0.6 OS: windows2000
Private report: No CVE-ID: None
 [2001-12-04 17:15 UTC] narcotic at labs dot gr
setcookie does not send cookie to browser, you have to refresh the page for the cookie to be send, i cannot find any other solution

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-04 17:17 UTC] derick@php.net
Not a bug, from the manual (http://uk.php.net/manual/en/function.setcookie.php):

 Common Pitfalls:

    *

      Cookies will not become visible until the next loading of a page that the cookie should be visible for.
 [2002-03-04 16:46 UTC] krane at adm dot njit dot edu
That only applies when you are trying to access the cookie from the same page that wrote it.  Since cookie information is sent to the server from the client with the header information, the server cant get the cookie until the header information is sent to it (eg from a page request, refresh, header redirect, etc).

That's somewhat different than setcookie() outright not working on win2k/iis5 :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 16:01:30 2024 UTC