note 27064 deleted from function.setcookie by john
| From: | john@php.net | Date: | Sat, 30 Nov 2002 16:44:21 +0000 |
| Subject: | note 27064 deleted from function.setcookie by john | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-40182@lists.php.net to get a copy of this message | ||
USING:
Windows 2000
Apache Server for Windows 2.0.40
PHP4-win32
IE 5+
This app is specifically built for IE, so I am unaware of any difficulties with Netscape.
I kept getting various errors when trying to set a cookie for user login. I was doing generic test,
so I was only doing:
setcookie("cookieid", $value);
Eventually I noticed that the cookie was set in that directory, and all of it's subdirectories,
but not in any other directories (parents or siblings).
However, on the system with the configuration mentioned above, the cookie needed to be set as
follows:
setcookie("cookieid", $value, time()+3600, "/");
That allowed the cookie to be used in all directories throughout the site.