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 Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to