php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #52916 Reference to old RFC version
Submitted: 2010-09-23 17:51 UTC Modified: 2010-09-24 06:06 UTC
From: ds11 at o2 dot pl Assigned: aharvey (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: -
Private report: No CVE-ID: None
 [2010-09-23 17:51 UTC] ds11 at o2 dot pl
Description:
------------
I noticed that on this page: http://php.net/manual/en/function.setcookie.php in section "Parameters" -> "domain" you refer to an old version of a set-cookie spec. However it was never approved for common use. You should refer to: http://www.ietf.org/rfc/rfc2109.txt

This is especially important for the domain because your reference says:
"
Only hosts within the specified domain can set a cookie for a domain and domains must have at least two (2) or three (3) periods in them to prevent domains of the form: ".com", ".edu", and "va.us". Any domain that fails within one of the seven special top level domains listed below only require two periods. Any other domain requires at least three. The seven special top level domains are: "COM", "EDU", "NET", "ORG", "GOV", "MIL", and "INT". 
"

but ultimately the limitation was dropped (see my link), e.g. you can use .my.tv as a domain.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-09-24 05:44 UTC] aharvey@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: aharvey
 [2010-09-24 05:44 UTC] aharvey@php.net
I suspect the original spec is being referred to because it's considerably more readable than the RFC, rather than because it's considered authoritative.

It would probably be best to relegate the links to the Netscape spec to the See Also section (with an appropriate name) and either find another resource to fall back on or roll a description of tail matching into the setcookie() page proper.
 [2010-09-24 06:06 UTC] aharvey@php.net
Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&revision=303739
Log: Fix doc bug #52916 (Reference to old RFC version) by removing the references to
the Netscape cookie spec in the parameters section and adding a little more
detail to the domain parameter description on how that parameter should be
structured and is matched.
 [2010-09-24 06:06 UTC] aharvey@php.net
-Status: Assigned +Status: Closed
 [2010-09-24 06:06 UTC] aharvey@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 03:00:01 2026 UTC