|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #600 return true/false for setcookie() ?
Submitted: 1998-07-30 15:37 UTC Modified: 1998-07-30 15:51 UTC
From: stein at lakenet dot no Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 3.0 Final Release OS: Linux
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.
Block user comment
Status: Assign to:
Bug Type:
From: stein at lakenet dot no
New email:
PHP Version: OS:


 [1998-07-30 15:37 UTC] stein at lakenet dot no
the setcookie function does'nt seem to be able to test
on if the user client has cancelled/refused the cookie
or not.

if you try to pass a cookie with each page, and make a
record in a database, the database would swell with one
entry for each refused-cookie-pageveiw.

beeing able to do: "if(setcookie(..." (false if denied),
would solve this. don't know if this is possible protocol-
wise, though...

Stein Evenrud


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1998-07-30 15:51 UTC] rasmus
Technically impossible.  SetCookie() simply sets the cookie in a header that gets sent to the browser.  There is no way to tell if the browser accepted the cookie until the next request from that browser.  You will have to test for this yourself in a subsequent page.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 22 03:01:29 2024 UTC