Doc #65830 [Opn->Nab]: important information on setcookie is missing

From: Date: Fri, 04 Oct 2013 16:37:35 +0000
Subject: Doc #65830 [Opn->Nab]: important information on setcookie is missing
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-10409@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=65830&edit=1 ID: 65830 Updated by: krakjoe@php.net Reported by: mash at sha-mash dot de Summary: important information on setcookie is missing -Status: Open +Status: Not a bug Type: Documentation Problem Package: Documentation problem Operating System: Linux PHP Version: 5.5.4 Block user comment: N Private report: N New Comment: This is a programming error: a domain cannot include a slash. Previous Comments: ------------------------------------------------------------------------ [2013-10-04 15:00:22] gabri dot ns at gmail dot com the documentation already, clearly, tell you to use domain name. even an example is provided, and it is not containing trailing slash. try execute this line to more understanding which part is which from an URL print_r(parse_url("http://gabri:1234@google.com:80/my/document.html")); ------------------------------------------------------------------------ [2013-10-04 14:17:34] mash at sha-mash dot de Description: ------------ --- From manual page: http://www.php.net/function.setcookie --- I have been searching for an hour why my cookie was not set by setcookie('user',$value,time()+3600,'/',$SITENAME,0,0); where $SITENAME equals 'www.qmd.test/' until I figured out that the trailing slash prevents the cookie from being set. Maybe this would be helpful to insert into the documentation part of this parameter (domain). Keep up the good work and Thanks for your work -m*sh- ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=65830&edit=1

« previous php.doc.bugs (#10409) next »