php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #1911 Cookies with '.' in it's name have it changed to '_'
Submitted: 1999-07-28 18:21 UTC Modified: 1999-11-13 17:47 UTC
From: jneves at rnl dot ist dot utl dot pt Assigned: Torben (profile)
Status: Closed Package: Documentation problem
PHP Version: 3.0.11 OS: Linux (probably any)
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jneves at rnl dot ist dot utl dot pt
New email:
PHP Version: OS:

 

 [1999-07-28 18:21 UTC] jneves at rnl dot ist dot utl dot pt
Script that shows the problem. I'm not sure this is a cookie parsing problem or a lack of documentation one.

<?
   $a = strtr("http://puzzle.dhis.org/", ".", ".");
   setcookie($a, 'copyleft.gif');
?>
<html>
<head><title><? echo "$a - $Teste" ?></title></head>
<body>
<?
 echo "Referer = $HTTP_REFERER $a";
 echo '<br> Cookie =';
 echo ${$a};
 echo " or ";
 echo $HTTP_COOKIE_VARS[$a];
 echo '<p>';

 for (reset($HTTP_COOKIE_VARS); $key = key($HTTP_COOKIE_VARS); next($HTTP_COOKIE
        echo "HTTP_COOKIE_VARS[$key] = ".$HTTP_COOKIE_VARS[$key]."\n";
 }                   
?>
</body>
</html>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-07-28 18:24 UTC] andrey at cvs dot php dot net
This is as design. "." is not a valid part of variable name.
 [1999-11-13 17:47 UTC] cslawi at cvs dot php dot net
Note added to docs in 'Variables from outside PHP'. This is
the intended behaviour.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 16:01:38 2025 UTC