Re: [PHP] Session puzzle... / why no new session?
On 6/9/06, Ryan A [EMAIL PROTECTED] wrote: ini_set('session.name', 'COSTREAM_SESSION'); Check out http://us2.php.net/manual/en/function.session-name.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session puzzle... / why no new session?
Hey Chris, Thanks for replying. Dont worry about it, solved it, made a silly mistake on my part but corrected it by just copying the code from the session_destroy page on the manual...destroyed the session and the cookie and all works good now. Thanks! Ryan If you're logging straight back in after logging out, maybe not - the browser might remember the old session. If you log out, close the browser then go to the login page you should get a new id. If you want to guarantee a new id, use http://php.net/session_regenerate_id -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Session puzzle... / why no new session?
Hi, I am working on a very simple script, basically adding features to an older script, I'll write down the main parts: ?php ini_set('session.name', 'COSTREAM_SESSION'); session_start(); ## authenticate user code comes here ## log the user my_log(login,$user,$_REQUEST['COSTREAM_SESSION']); ? and for logout.php I have: - ini_set('session.name', 'COSTREAM_SESSION'); session_start(); unset($_SESSION['user']); session_destroy(); -- redirect user comes here - but when I check the DB the session id is always the same hash, I should be getting new hashes everytime I login right? I am running the logout script before logging in again...why is it always giving me the same hash? What am I missing? Thanks! Ryan -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session puzzle... / why no new session?
On 6/10/06, Ryan A [EMAIL PROTECTED] wrote: Hi, I am working on a very simple script, basically adding features to an older script, I'll write down the main parts: ?php ini_set('session.name', 'COSTREAM_SESSION'); session_start(); ## authenticate user code comes here ## log the user my_log(login,$user,$_REQUEST['COSTREAM_SESSION']); ? and for logout.php I have: - ini_set('session.name', 'COSTREAM_SESSION'); session_start(); unset($_SESSION['user']); session_destroy(); -- redirect user comes here - but when I check the DB the session id is always the same hash, I should be getting new hashes everytime I login right? I am running the logout script before logging in again...why is it always giving me the same hash? If you're logging straight back in after logging out, maybe not - the browser might remember the old session. If you log out, close the browser then go to the login page you should get a new id. If you want to guarantee a new id, use http://php.net/session_regenerate_id -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php