fletchsod Posted June 6, 2006 Share Posted June 6, 2006 Everytime the session_destory() is issued, the /tmp/sess_*** files with the same session_id() are still there...Why does it not get destroyed?? How do we properly destroy it? I sometime wonder about trying to destroy the sessions in the memory as well (via session.save_handlers = "mm")...This is what I get...--snip--Warning: Session object destruction failed in php_library.inc on line 126--snip--Thanks, Scott Quote Link to comment https://forums.phpfreaks.com/topic/11360-session-destroying-the-sessions-sessions-tmp-file/ Share on other sites More sharing options...
wildteen88 Posted June 7, 2006 Share Posted June 7, 2006 You cannot delete or remove the session file generated with session_destroy. session_destory clears all the contents that is in the session file.Also when you destroy the session you can use the [a href=\"http://uk2.php.net/manual/en/function.session-regenerate-id.php\" target=\"_blank\"]session_regenerate_id[/a] function which regenerate the session id, therefore when the session is destroyed the old session_id is invalid. Quote Link to comment https://forums.phpfreaks.com/topic/11360-session-destroying-the-sessions-sessions-tmp-file/#findComment-42746 Share on other sites More sharing options...
fletchsod Posted June 7, 2006 Author Share Posted June 7, 2006 Interesting... I have read reports that some php developers had successfully destory the tmp session file via "session_destory()" command... Quote Link to comment https://forums.phpfreaks.com/topic/11360-session-destroying-the-sessions-sessions-tmp-file/#findComment-42814 Share on other sites More sharing options...
wildteen88 Posted June 7, 2006 Share Posted June 7, 2006 I suspect that they have used the [a href=\"http://uk.php.net/manual/en/function.session-set-save-handler.php\" target=\"_blank\"]session_set_save_handler[/a] functiion which allows you to define how you want session_destory to react when called. Such as it deletes the session file, rather than clearing contents of the file. In order to delete the session you need to make sure you have the correct permission set on both the folder that stores the session files and the session file it self you are about to delete.Thats probably they did it. Quote Link to comment https://forums.phpfreaks.com/topic/11360-session-destroying-the-sessions-sessions-tmp-file/#findComment-42825 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.