Where does PHP store session files in the file system?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Where does PHP store session files in the file system?

Post by JAB Creations »

Where does PHP store session files in the file system? The last time I remember needing to manually clear them there was a folder on XP somewhere and I could manually delete them. I will disregard any reason not to, I've done this in the past. I need to test IE on my work but even manually clearing cookies it's refusing to let go of sessions even after rebooting XP in VirtualBox. :roll:
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: Where does PHP store session files in the file system?

Post by JAB Creations »

Figured it out, in XAMPP it's XAMPP\tmp.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: Where does PHP store session files in the file system?

Post by John Cartwright »

I know you found it, but for future reference..

You can use session_save_path() to determine it.. otherwise look in your phpinfo();
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: Where does PHP store session files in the file system?

Post by JAB Creations »

Thanks, that sounds a lot easier! I actually was looking through php.ini and then out of no where wondered if there was a temp directory, found it, saw the readme file and confirmed it when I cleared everything in IE and it finally let go.
Post Reply