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
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: 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-2024 The PHP Group
All rights reserved.
Last updated: Sat Sep 28 23:01:27 2024 UTC