php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47896 Cookie delete
Submitted: 2009-04-04 19:37 UTC Modified: 2009-04-06 08:50 UTC
From: G dot B dot Yahav at gmail dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.2.9 OS: WINDOWS SERVER
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: G dot B dot Yahav at gmail dot com
New email:
PHP Version: OS:

 

 [2009-04-04 19:37 UTC] G dot B dot Yahav at gmail dot com
Description:
------------
Hey,
i got a problen about deleting cookie array.
when i use the code above with normal cookie, all work good, but when i defined a "cookie array" i cannot delete it.

Reproduce code:
---------------
<?php

// the cookie array name is PearServices_ClientSession

if( isset( $_COOKIE['PearServices_ClientSession'] ) )
		{
			foreach ( $_COOKIE['PearServices_ClientSession'] as $k => $v )
			{
				pearRegistry::DeleteCookie( "PearServices_ClientSession[".$k."]" );
			}
		}
// pearRegistry::deletecookie function

final static function DeleteCookie( $name )
	{
		setcookie( $name, "", time() -3600 );
	}
?>

Expected result:
----------------
Cookie disappire

Actual result:
--------------
Cookie still in browser...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-06 08:50 UTC] jani@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Sep 25 06:00:01 2025 UTC