Re: [PHP] Re-initiating an autostarted session

2005-05-17 Thread Ville Mattila
[EMAIL PROTECTED] wrote: Look in the user contributed notes in the session-destroy page. There is a function to wipe out the session and has worked nicely for me! http://www.php.net/session_destroy Thank you for a message. Anyway, I could not get it working (the code follows) - I do still have

Re: [PHP] Re-initiating an autostarted session

2005-05-16 Thread Marek Kilimajer
Ville Mattila wrote: Leif Gregory wrote: session_destroy(); session_start(); session_write_close(); Header(Location: ...); exit; I never tried regenerate. Just started a new session again. Hi Leif! Thanks for your reply. For some strange reason, this works not for me. The session cookie will not

Re: [PHP] Re-initiating an autostarted session

2005-05-16 Thread Ville Mattila
Marek Kilimajer wrote: the cookie variable still persists. you need to uset($_REQUEST[session_name()], $_COOKIES[session_name()] ...); Thanks Marek for a reply. I'm not sure but I have been thinking that unset($_COOKIES) does not destroy the cookie from the client side but just unsets the cookie

Re: [PHP] Re-initiating an autostarted session

2005-05-16 Thread Marek Kilimajer
Ville Mattila wrote: Marek Kilimajer wrote: the cookie variable still persists. you need to uset($_REQUEST[session_name()], $_COOKIES[session_name()] ...); Thanks Marek for a reply. I'm not sure but I have been thinking that unset($_COOKIES) does not destroy the cookie from the client side but

Re: [PHP] Re-initiating an autostarted session

2005-05-16 Thread Ville Mattila
Marek Kilimajer wrote: You are right, unset($_COOKIES) does not remove cookie from the client. You need to unset() it so that your next call to session_start() does not use the same $_COOKIES[session_name()]. session_start will generate new session id if there is not one set in the request

Re: [PHP] Re-initiating an autostarted session

2005-05-16 Thread Jason Barnett
Ville Mattila wrote: Marek Kilimajer wrote: You are right, unset($_COOKIES) does not remove cookie from the client. You need to unset() it so that your next call to session_start() does not use the same $_COOKIES[session_name()]. session_start will generate new session id if there is not one set

Re: [PHP] Re-initiating an autostarted session

2005-05-16 Thread disguised.jedi
But this code *still* does not destroy the cookie on the client side. Are you doing that somewhere else? /* Look in the user contributed notes in the session-destroy page. There is a function to wipe out the session and has worked nicely for me! http://www.php.net/session_destroy */ -- [EMAIL

Re: [PHP] Re-initiating an autostarted session

2005-05-15 Thread Ville Mattila
Leif Gregory wrote: session_destroy(); session_start(); session_write_close(); Header(Location: ...); exit; I never tried regenerate. Just started a new session again. Hi Leif! Thanks for your reply. For some strange reason, this works not for me. The session cookie will not be overwritten and

[PHP] Re-initiating an autostarted session

2005-05-11 Thread Ville Mattila
Hi there, I have some problems with PHP session handling. I have set to .htaccess file that PHP will start sessions and use cookies only automatically. Everything works fine until I need to re-initiate the session (give a new session ID and destroy the old one). For some reason, the old

Re: [PHP] Re-initiating an autostarted session

2005-05-11 Thread Leif Gregory
Hello Ville, Wednesday, May 11, 2005, 12:32:07 PM, you wrote: V session_destroy(); V session_regenerate_id(); V session_write_close(); V Header(Location: ...); V exit; I honestly don't know if it's the right way, but I ran into a similar issue a while back. I did it this way: