ID: 15441 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Feedback Bug Type: HTTP related Operating System: Solaris 7 PHP Version: 4.1.1 New Comment:
>From the setcookie page. "When deleting a cookie you should assure that the expiration date is in the past, to trigger the removal mechanism in your browser." Try this setcookie($username_cookie, '', time()-3600); -Chris Previous Comments: ------------------------------------------------------------------------ [2002-02-08 00:26:56] [EMAIL PROTECTED] Using PHP 4.1.x, the following code, which is intended to delete a cookie, instead replaces the value with %00 (ascii entity null?) Cookies are set with the following: setcookie($username_cookie,'username'); setcookie($password_cookie,md5('password')); Cookies are deleted with the following: setcookie($username_cookie); setcookie($password_cookie); Yes, the $username_cookie and $password_cookie variables have values. The above is case (a) in the documentation, the simplest case. I've tried this on all the systems I have access to. Affected: Solaris 7, PHP 4.1.0 Red Hat 7.1, PHP 4.1.1 Not Affected: Red Hat 7.1, PHP 4.04pl1 Mac OS X 10.1.2, PHP 4.0.6 Solaris 7, PHP 4.06 One affected system that I've used is on a web host (communitech.net, who just very recently moved to PHP 4.1.0 from 3.0.9, Solaris 7). The other is on the freshly setup intranet server at my employer (Linux 4.1.1). Here's the configuration line (Solaris 7, PHP 4.1.0): './configure' '--with-mysql=/usr/local/mysql' '--with- curl=/root/src/curl/curl-7.9.3' '--with-xml' '--with- apache=/root/src/apache/apache-fp_1.3.3' And the one from Red Hat 7, PHP 4.1.1: './configure' '--prefix=/usr/local' '--with-apache=/usr/ local/src/apache/Apachetoolbox-1.5.50/apache_1.3.22' '-- enable-exif' '--enable-track-vars' '--with-calendar=shared' '--enable-safe-mode' '--enable-magic-quotes' '--enable- trans-sid' '--enable-wddx' '--enable-ftp' '--with-gd=/usr/ local' '--with-zlib' '--enable-gd-native-tt' '--with-t1lib= /usr/local' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '- -with-zlib-dir=/usr' '--with-ttf' '--with-freetype-dir=/ usr' '--with-imap=/usr/local' '--with-openssl=/usr' '-- with-mysql=/usr/local/mysql' '--with-pgsql' '--with-ldap' The same code works in previous versions of PHP to 4.1, as indicated above. I've tried the code in three different browsers so I don't think it is browser dependent. The actual piece of code is part of a larger system. I can give you the code or access to one of the servers if necessary. Thanks in advance. Paul Burney Webmaster Concord Consortium and UCLA GSE&IS ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15441&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php