Doc #71106 [NEW]: Unclear explanation of cookie-domain

From: Date: Sat, 12 Dec 2015 19:34:58 +0000
Subject: Doc #71106 [NEW]: Unclear explanation of cookie-domain
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-12930@lists.php.net to get a copy of this message
From: david dot bruchmann at gmail dot com Operating system: PHP version: Irrelevant Package: Documentation problem Bug Type: Documentation Problem Bug description:Unclear explanation of cookie-domain Description: ------------ The current documentation of cookie-domain on the page function.setcookie.php: " domain The domain that the cookie is available to. Setting the domain to 'www.example.com' will make the cookie available in the www subdomain and higher subdomains. Cookies available to a lower domain, such as 'example.com' will be available to higher subdomains, such as 'www.example.com'. Older browsers still implementing the deprecated » RFC 2109 may require a leading . to match all subdomains. " This is unclear, the words higher and lower are used wrong or at least confusing and the explanation never helps much in practical usage. I propose the following text: " domain The cookie-domain can be set to widen the default restriction to the current domain. The main-domain and all sub-domains are covered if the cookie-domain is set to the main-domain such as 'example.com'. If the cookie-domain is set to a sub-domain such as 'sub1.example.com' then this and all sub-domains of 'sub1.example.com' are covered, i.e. 'sub2.sub1.example.com'. Using the cookie-domain can be done from any of the covered domains and cookies are available on all these domains then. Setting the cookie-domain from a domain that is not covered by the defined domain is not possible. Older browsers still implementing the deprecated » RFC 2109 may require a leading . to match all subdomains. " -- Edit bug report at https://bugs.php.net/bug.php?id=71106&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71106&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71106&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71106&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=71106&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=71106&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=71106&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=71106&r=needscript Try newer version: https://bugs.php.net/fix.php?id=71106&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=71106&r=support Expected behavior: https://bugs.php.net/fix.php?id=71106&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=71106&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=71106&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=71106&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71106&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=71106&r=dst IIS Stability: https://bugs.php.net/fix.php?id=71106&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=71106&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=71106&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=71106&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=71106&r=mysqlcfg

« previous php.doc.bugs (#12930) next »