![]() |
Session expire from server command line - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Session expire from server command line (/showthread.php?tid=69619) |
Session expire from server command line - petepot - 12-24-2017 Hi! Is it possible to manually force a session expire from server command line? (i use Linux with Apache2 and CodeIgniter v2.2.6) thanks in advance, -PetePot- RE: Session expire from server command line - plonknimbuzz - 12-25-2017 you cant. because browser and CLI is treated as different user. this like you want destroy firefox session with your chrome session. if you really to do that. you can delete your browser cache to destroy your browser session using CLI RE: Session expire from server command line - XtreemDeveloper - 12-28-2017 Delete the contents of the specified folder: $ rm -Rf /var/lib/php/session/* Now all of the current user sessions should be cleared. If you store sessions in the DB or memory, you will need to clear the sessions manually via whatever software you use for session management. RE: Session expire from server command line - InsiteFX - 12-28-2017 @XtreemDeveloper And then what happens if he has sessions that are active? You should never just tell someone to delete a folder without first telling them to make a backup of that folder! Also you can delete the sessions by checking to see if they are active using a CodeIgniter method, because i wrote one for checking the database sessions. RE: Session expire from server command line - Narf - 01-02-2018 CI2 sessions relied exclusively on cookies, so no - not possible. Yet another reason to upgrade. |