From:             [EMAIL PROTECTED]
Operating system: 
PHP version:      4.2.0
PHP Bug Type:     Session related
Bug description:  PHP not reading/writing cookies properly

This bug concerns & and = in cookies which is supported (ie.
document.cookies) in my Netscape 6.1 and IE 5.5 on my Win2K, Apache
2.0.35, PHP 4.2 (as module) system.

I have made the following test:  First, using Header in the index.php test
file below, I set a cookie by the name of CookieTest to the following:
Var1=Hi%20Mom&Var2=Frob
The script below demonstrates that the cookie is received by the browser,
but PHP fails to put the cookie into $_COOKIE (and $_REQUEST).

<html><head><title>Testing cookies</title></head><body>
<?php
    Header("Set-Cookie: CookieTest=Var1=Hi%20Mom&Var2=Frob; expires=Thu,
07-May-02 00:00:00 GMT; path=/");
    $aHeaders = getallheaders();
    foreach ($aHeaders as $key=>$hdr)
        print "<br>Header $key: $hdr\r\n";
?>
<br><br>Cookies according to browser:<br>
<script>document.write(document.cookie)</script>
<?php phpinfo(); ?>
</body></html>
-- 
Edit bug report at http://bugs.php.net/?id=17050&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=17050&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=17050&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=17050&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=17050&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17050&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=17050&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=17050&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=17050&r=submittedtwice
register_globals:    http://bugs.php.net/fix.php?id=17050&r=globals

Reply via email to