|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
34 - 22 = ?
Subscribe to this entry?

 [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-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 22 13:01:29 2024 UTC