#33322 [Bgs->Opn]: I can´t set a cookie
| From: | j-pieper at web dot de | Date: | Mon, 13 Jun 2005 19:24:40 +0000 |
| Subject: | #33322 [Bgs->Opn]: I can´t set a cookie | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-80248@lists.php.net to get a copy of this message | ||
ID: 33322
User updated by: j-pieper at web dot de
Reported By: j-pieper at web dot de
-Status: Bogus
+Status: Open
Bug Type: *General Issues
Operating System: Fedora Project C3
PHP Version: 5.0.4
New Comment:
Update:
-------
When I use the code example from
http://de2.php.net/manual/de/function.headers-list.php
I do not get the
shown result. I get an empty array.
Previous Comments:
------------------------------------------------------------------------
[2005-06-13 20:39:22] j-pieper at web dot de
Yeah I read it and I tested a few ways to set a cookie. My Browser
(Mozilla Firefox 1.0.4) accepts Cookies and i reloaded the page after
setting the Cookie but a cookie won´t be set.
------------------------------------------------------------------------
[2005-06-13 15:43:54] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Reload the page after setting the cookie and accept
cookies in your browser.
------------------------------------------------------------------------
[2005-06-13 15:37:12] j-pieper at web dot de
Description:
------------
I can´t set a cookie in my application. I created a small file with
only setting a cookie and controlling the content of $_COOKIE but there
is nothing. I also get no error-message.
Reproduce code:
---------------
<?php
error_reporting(E_ALL);
setcookie('foo', 'bar', time()+86400);
var_dump($_COOKIE);
?>
Expected result:
----------------
Somthing like this:
array(1) {
["foo"]=> string(3) "bar"
}
Actual result:
--------------
array(0) { }
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33322&edit=1