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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 12:01:27 2024 UTC