ID: 22239 Updated by: [EMAIL PROTECTED] Reported By: todd at ubermother dot net -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: any PHP Version: 4.3.0 New Comment:
This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2003-02-16 03:16:00] todd at ubermother dot net In the current version of the PHP html documentation, under the function "setcookie(...)" it states: If only the name argument is present, the cookie by that name will be deleted from the remote client. This is only partially true, as the other arguments to the function must be called exactly as they were upon creation of the cookie. At least this is true for Mozilla 1.1 (verified with the cookie manager), and your documentation seems to indicate the same, when it states under "Common Pitfalls": Cookies must be deleted with the same parameters as they were set with. Making this point clear from the beginning would save confusion for developers. This is also a problem since sites that mirror the documentation (at least zend.org) don't always include the "Common Pitfalls" section. Consider replacing: If only the name argument is present, the cookie by that name will be deleted from the remote client. With: If the value argument is an empty string (""), and all other arguments match a previous call to setcookie, then the cookie with the specified name will be deleted from the remote browser. Also, a sample of doing this would be nice: If in login.php you have: <? setcookie("UID","SOMEVALUE","/subdir","myhost.com",TRUE); ?> You should have in logout.php: <? setcookie("UID","","/subdir","myhost.com",TRUE); ?> Thanks for your attention, Todd Willey ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22239&edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
