note 37763 deleted from function.setcookie by tularis
| From: | tularis@php.net | Date: | Sun, 02 Jan 2005 14:20:46 +0000 |
| Subject: | note 37763 deleted from function.setcookie by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-82587@lists.php.net to get a copy of this message | ||
Note Submitter: frymaster
----
a note about cookies, subdomains and poorly formed domain names: for a cookie to correctly set
itself to be read across multiple subdomains it *must* contain at least one 'dot'.
this is important if you are developing an application on a test server on your local network and
are accessing it by a domain set in either /etc/hosts or the lmhosts file. if the domain you have
chosen is not well-formed, your cross subdomain cookies will not work.
example:
your /etc/hosts file looks like this
192.168.1.1 testserver site1.testserver site2.testserver
you will not be able to create cookies across the subdomains. to rectify this situation, make sure
that your hostnames have a 'dot' in them, as so:
192.168.1.1 testserver.foo site1.testserver.foo site2.testserver.foo