PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Bug Tracker

Reply
 
Thread Tools
Old 07-12-2004, 02:16 PM   #1
manfred
Orange Mole
 
Join Date: Nov 2003
Posts: 42
Logout does not clear cookies

I can't log out with this new cookie based authoring system. When logout is clicked it just refresh the index.page and that's all.

Session based works OK.

WinXP, Apache 2.0.50, PHP5.0RC2 in use

M
manfred is offline   Reply With Quote
Old 07-12-2004, 02:25 PM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. Maybe a cache issue... what if you refresh?
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 07-12-2004, 02:32 PM   #3
manfred
Orange Mole
 
Join Date: Nov 2003
Posts: 42
Done that but still at admin page. Is there any special settings in php.ini or apache config file for cookies?

Or this can be a bug in PHP5RC2

M
manfred is offline   Reply With Quote
Old 07-12-2004, 02:35 PM   #4
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Don't know if it's related to PHP5RC2 or not?

Try sticking all this at the top of admin/index.php and see if it takes:
PHP Code:
// prevent caching code from php.net
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Last-Modified: " gmdate("D, d M Y H:i:s") . " GMT"); // always modified
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0"false); // HTTP/1.1
header("Pragma: no-cache"); // HTTP/1.0 
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 07-12-2004, 02:43 PM   #5
manfred
Orange Mole
 
Join Date: Nov 2003
Posts: 42
Didn't help, also tried with PHP5RC1. I will study this further tomorrow with latest PHP version. Strange that I'm the only one having this problem.

M
manfred is offline   Reply With Quote
Old 07-12-2004, 02:52 PM   #6
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
In logout.php change:
PHP Code:
setcookie("phpdigadmin"""time()-3600); 
to the following:
PHP Code:
setcookie("phpdigadmin"""time()-3600"/"); 
Did it help?
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 07-12-2004, 02:58 PM   #7
manfred
Orange Mole
 
Join Date: Nov 2003
Posts: 42
Thanks, now it works. Also in php.net they think this is better way to clear cookies.



PHP Code:
setcookie("phpdigadmin"""mktime(12,0,0,111970), "/"); 
M
manfred is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Clear List of Queries Kvasir How-to Forum 1 05-19-2005 06:55 AM
bug with cookies? fredh Mod Submissions 6 05-04-2004 06:47 PM
cookies and phpdig Darknss Troubleshooting 2 03-05-2004 07:38 PM
Clear logs from admin panel manfred Mod Submissions 2 02-25-2004 06:15 AM


All times are GMT -8. The time now is 12:33 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.