note 90137 deleted from function.setcookie by danbrown
| From: | danbrown@php.net | Date: | Tue, 07 Apr 2009 20:15:15 +0000 |
| Subject: | note 90137 deleted from function.setcookie by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-152925@lists.php.net to get a copy of this message | ||
Note Submitter: Adam Buczynski
----
I found that with the latest version of Chrome browser, the cookies were not being set at all.
The code I used was:
setcookie($name,
$data,
time() + 31536000,
'/',
'.example.com'
false
);
Changing this to the following resolved the issue:
setcookie($name,
$data,
time() + 31536000
);
Thus, removing the last 3 parameters. But the 4th parameter was the one causing the trouble. For
some reason, I can't find any other references of this issue on internet, but I tested and
experience it on two different computers.
Hope this helps some people who like using Chrome, if anyone can shed some light on this issue it
would be great too.