Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Sign out problem

edited June 2006 in Vanilla 1.0 Help
Hi all, I have installed lussumo vanilla 0.9.2.6 forum. However, I have encountered this error everytime I signed out: Warning: session_destroy(): Session object destruction failed in c:\hosting\test\member\xp\forum\library\Vanilla.Session.class.php on line 33 Warning: Cannot modify header information - headers already sent by (output started at c:\hosting\test\member\xp\forum\library\Vanilla.Session.class.php:33) in c:\hosting\test\member\xp\forum\library\Vanilla.Session.class.php on line 35 Warning: Cannot modify header information - headers already sent by (output started at c:\hosting\test\member\xp\forum\library\Vanilla.Session.class.php:33) in c:\hosting\test\member\xp\forum\library\Vanilla.Session.class.php on line 37 Was it something I did wrong? Regards, copet80

Comments

  • The header errors are a direct cause of the first error so not to worry. The first error might suggest your php configuration has something wrong with its sessions but in that case i'd also expect an error when you signed in. Do you use sessions anywhere else on your server?
  • No. Well, actually I don't know because it's a shared hosting. But for all I know, my folder only has vanilla running. And I did not get any error signing in, it works just fine. Have you encountered anything like this ever?
  • Not that i can remember but i've seen a ton of errors pass my eyes. Does it actually sign you out or do you stay logged in?
    If it signs you out alright and you dont mind living with the errors too much i seriously think just waiting for the official v1 release would be the easiest thing unless anyone else has any bright ideas?
  • edited June 2006
    Try replacing session_destroy();
    in Vanilla.Session.class.php on line 33 with unset($session_variable);

    I have no idea if that works at all, but it may.
  • Minisweeper, it didn't sign me out. Bergamot, changing the line actually turns off the error message, however it still didn't sign me out.
  • would it be unset($_SESSION) bergie? or is that depracated? I never bother keeping track of what does and doesnt exist these days. Why session_destroy doesnt work is still a puzzle though.
  • No idea; I just found that on a site somewhere talking about that error message.
  • i see. worth a go.
  • I have found the solution. These is the code that I used: // Unset all of the session variables. $_SESSION = array(); // If it's desired to kill the session, also delete the session cookie. // Note: This will destroy the session, and not just the session data! if (isset($_COOKIE[session_name()])) { setcookie(session_name(), '', time()-42000, '/'); } // Finally, destroy the session. //session_destroy(); unset($_SESSION); // Destroy the cookies as well setcookie("name", " ", time()-3600,"/",agCOOKIE_DOMAIN); unset($_COOKIE["name"]); setcookie("pass", " ", time()-3600,"/",agCOOKIE_DOMAIN); unset($_COOKIE["pass"]); It works as a wonder, but I still don't quite understand the actual problem thou LOL
This discussion has been closed.