Jump to content

Logging out issues...


fred123

Recommended Posts

Hello ;D

 

I'm having a bit of a problem with a member system i'm working on.

 

I've got the login, registering and new password systems working fine, but i'm having a problem with the logout system.

 

I login on ./index.php through ./login.php which then redirects me to ./a/index.php.

 

All fine so far, and when i want to log out i follow the link on the ./a/index.php page to ./a/logout.php.

 

./a/logout.php

setcookie($cookiename, "", time()-172800, "/a/");

 

All pretty standard and working fine in Firefox.

 

However, in IE when i follow this link it fails to delete the cookie. The setcookie function appears to execute successfully, but simply does not delete the cookie. It doesn't work either when i type it directly into the browser address bar. It does seem to work when i type it in the Google search bar i use, which redirects me to the page, but this obviously isn't in any way practical but adds to the puzzle.

 

Anyway, this has me rather bamboozled so any help towards solving this would be greatly appreciated.

Link to comment
Share on other sites

Does it work if you create and delete the cookie from scripts running under the same path?  Eg, run both scripts under "/" or both scripts under "/a/".

 

Another thing to try is to create and delete your cookie without setting the path.  If either of those work, then you know it's an issue with paths.

Link to comment
Share on other sites

When faced with this kind of problem, I often use browser based tools like firefox "Live HTTP headers" and web developer toolbar, and IE's developer toolbar (download from microsoft.com).  When you see exactly what headers are actually being sent by your script, sometimes you can notice something that isn't quite right.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.