From:             simon at incarnis dot com
Operating system: Solaris 10
PHP version:      5.2.6
PHP Bug Type:     *Web Server problem
Bug description:  setcookie with past date fails to delete cookie if path not 
set

Description:
------------
Cookie is created with an 8 hour expiry time, supplying only the name,
value and expire parameters.

Attempt to remove cookie using setcookie with the same name, a null value
and an expire parameter of -1 hours.

Cookie not removed.

Supplying the (supposedly optional) path parameter set to "/" successfully
removes the cookie.



Reproduce code:
---------------
setcookie("user", $_SESSION[user], mktime()+(60*60*8));  


...
...

setcookie("user",NULL,mktime()-3600);       

Expected result:
----------------
Cookie should not exist.

Actual result:
--------------
Cookie does exist. Add a path parameter of "/" to the removal call and the
cookie is removed.

-- 
Edit bug report at http://bugs.php.net/?id=46639&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=46639&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=46639&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=46639&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=46639&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=46639&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=46639&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=46639&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=46639&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=46639&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=46639&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=46639&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=46639&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=46639&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=46639&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=46639&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=46639&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=46639&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=46639&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=46639&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=46639&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=46639&r=mysqlcfg

Reply via email to