note 37763 added to function.setcookie

From: Date: Tue, 25 Nov 2003 21:40:48 +0000
Subject: note 37763 added to function.setcookie
Groups: php.notes 
Request: Send a blank email to php-notes+get-60985@lists.php.net to get a copy of this message
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 ---- Manual Page -- http://www.php.net/manual/en/function.setcookie.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+37763 Delete -- http://master.php.net/manage/user-notes.php?action=delete+37763&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+37763&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#60985) next »