note 90137 added to function.setcookie
| From: | AdamBuczynski at osu1 dot php dot net | Date: | Tue, 07 Apr 2009 20:12:54 +0000 |
| Subject: | note 90137 added to function.setcookie | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-152924@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 83.137.20.135
Probable Submitter: 194.171.50.215
----
Manual Page -- http://www.php.net/manual/en/function.setcookie.php
Edit -- https://master.php.net/note/edit/90137
Del: integrated -- https://master.php.net/note/delete/90137/integrated
Del: useless -- https://master.php.net/note/delete/90137/useless
Del: bad code -- https://master.php.net/note/delete/90137/bad+code
Del: spam -- https://master.php.net/note/delete/90137/spam
Del: non-english -- https://master.php.net/note/delete/90137/non-english
Del: in docs -- https://master.php.net/note/delete/90137/in+docs
Del: other reasons-- https://master.php.net/note/delete/90137
Reject -- https://master.php.net/note/reject/90137
Search -- https://master.php.net/manage/user-notes.php