php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20571 setcookie() and domain
Submitted: 2002-11-22 08:41 UTC Modified: 2002-11-22 11:18 UTC
From: crespin dot quartz at Wanadoo dot fr Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.3.0RC1 OS: Windows NT 5.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: crespin dot quartz at Wanadoo dot fr
New email:
PHP Version: OS:

 

 [2002-11-22 08:41 UTC] crespin dot quartz at Wanadoo dot fr
My current version is : php-4.3.0pre2-Win32
It's a cookie problem.

I'm using setcookie("visit",$nb_visit+1,mktime(0,0,0,12,31,2002),"/php/","www.quartz.fr",false);
In HTTP documentation domain must have at least two dots.
If I check in the cookies manager of the navigator, the domain is set as ".www.quartz.fr".
If I don't put path and domain in setcookie(), the domain is correct.

This is a problem only if I want to delete the cookie...
I call 
setcookie("visit");
and PHP add the default domain "www.quartz.fr",
and the navigator creat a new cookie!
One for ".www.quartz.fr" and the second for "www.quartz.fr"!



The only

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-22 11:18 UTC] sniper@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 13:01:33 2025 UTC