note 51195 added to function.setcookie

From: Date: Wed, 23 Mar 2005 10:00:52 +0000
Subject: note 51195 added to function.setcookie
Groups: php.notes 
Request: Send a blank email to php-notes+get-86831@lists.php.net to get a copy of this message
I've found that when using header("Location: <destination page>") type 302 redirect, that cookie information in the header will be silently dropped if the <destination page> path includes any non-alphanumeric (except the allowed "-" and ".") characters. That had been pointed out above, and is documented with Microsoft as by design... http://support.microsoft.com/default.aspx?scid=kb;EN-US;316112 ...but what is not made clear, is that the rule seems to include file and directory names too! Also, I've had unpredictable results when the <destination page> filename begins with ANY character other than strictly alphanumeric characters, even the otherwise allowed "-" and "." characters; and/or if the <destination page> is in a different directory. ---- Manual Page -- http://www.php.net/manual/en/function.setcookie.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+51195 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51195&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51195&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51195&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51195&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51195&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+51195&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#86831) next »