php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: clarence_cheong at yahoo dot com
New email:
PHP Version: OS:

 

 [2004-03-02 12:43 UTC] clarence_cheong at yahoo dot com
Description:
------------
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)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-02 13:10 UTC] derick@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. 

Thank you for your interest in PHP.

.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 09:01:27 2024 UTC