[Bug 325266] Re: Firefox does not set cookies for http://localhost

Hendy Irawan hendy at rainbowpurple.com
Wed Sep 2 02:55:19 UTC 2009


Updated version of testcookie.php that better illustrates the problem without external tool: (everything between dashes is the contents of script, do not put any leading whitespace)
--------------------------------------
<?php
$lastcookies = $_COOKIE;
setcookie('cookietest', 'php', time()+3600, '/', 'localhost');
?>

<p>Contents of $_COOKIE (this should NOT be empty after second refresh):</p>
<pre><?php print_r($lastcookies); ?></pre>

<p>Check the cookie. Make sure to run this script from http://localhost/something.php (root path)</p>
-----------------------------------

the domain part of setcookie() must be set to the domain to be tested
(localhost for example)

-- 
Firefox does not set cookies for http://localhost
https://bugs.launchpad.net/bugs/325266
You received this bug notification because you are a member of Mozilla
Bugs, which is subscribed to firefox-3.0 in ubuntu.




More information about the Ubuntu-mozillateam-bugs mailing list