|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27462 Cookie Problem
Submitted: 2004-03-02 12:43 UTC Modified: 2004-03-02 13:10 UTC
From: clarence_cheong at yahoo dot com Assigned:
Status: Not a bug Package: Performance problem
PHP Version: 4.3.5RC3 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: clarence_cheong at yahoo dot com
New email:
PHP Version: OS:


 [2004-03-02 12:43 UTC] clarence_cheong at yahoo dot com
I am attempting to make a login system,
After a login, i the Login Page script

At every secured page, i do an if statement to check if the cookie is there, before the information loads...

The problem happens at the logout page, 
Cookie value refuse to change!

Changes done to php.ini are just register_global and display_error

Reproduce code:
# Login Page
function incTimeOut() {
include "config/config_dat.php";
  setcookie("session", "true", time()+$timeout);
  setcookie("session2", "true");
//$timeout can be found in config_dat.php

# Logoff Page

function logout() {
  setcookie("session", "false", time()-10);
  setcookie("session2", "false", time()-10);

Expected result:
Expected to see both the cookie value becoming false after running the logout page.

Actual result:
I did an echo along the pages to see the cookie value, but unfortunately, session and session2 kept remaining at "true" (At all pages in that folder)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-02 13:10 UTC]
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 as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Jun 18 04:01:24 2021 UTC