|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #60026 Remove references to obsolete RFC 2109 in manual page for setcookie()
Submitted: 2011-10-10 06:29 UTC Modified: 2011-12-03 20:41 UTC
From: bugs dot php dot net at chsc dot dk Assigned: frozenfire (profile)
Status: Closed Package: HTTP related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
21 + 29 = ?
Subscribe to this entry?

 [2011-10-10 06:29 UTC] bugs dot php dot net at chsc dot dk
The page contains several references to RFC 2109. This has been obsoleted by RFC 6265 (published April 2011).

In particular, the manual page currently says:
> domain:
> The domain that the cookie is available to. To make the cookie available
> on all subdomains of (including itself) then you'd
> set it to ''. Although some browsers will accept cookies
> without the initial ., RFC 2109 requires it to be included. Setting the
> domain to '' or '' will make the cookie only
> available in the www subdomain.

The requirement about the leading period has been reverted, so now it is no longer permitted, though browsers are required to ignore any leading periods (section

I don't know if any current browsers require the use of a leading period. RFC 6265 claims to be describe current practice, and says that "[w]here some existing software differs from the recommended protocol in significant ways, the document contains a note explaining the difference". There is no mention of browsers malfunctioning when the leading period is omitted.

- The manual page should be updated to refer to RFC 6265.
- The examples should not use a leading period for the domain argument.
- The description of the domain argument should be rephrased to reflect the updated RFC.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-12-03 20:30 UTC]
-Assigned To: +Assigned To: frozenfire
 [2011-12-03 20:40 UTC]
Automatic comment from SVN on behalf of frozenfire
Log: Updated to reflect that cookies are now governed by RFC 6265 instead of RFC 2109. Closes bug #60026.
 [2011-12-03 20:41 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

 [2011-12-03 20:41 UTC]
-Status: Assigned +Status: Closed
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Mar 04 16:01:24 2021 UTC