A Forgotten Tool to Quickly Remove All Related Files
Today I found out there are over 100K PHP session files locate in Windows Temp directory and it’s impossible to open the Temp directory with Windows Explorer, hence not able to remove any file.
The solution is to use a dinosaur tool called DOS Command!
del /F /Q sess*
Da Da…after a few minutes, you can open the temp directory again with Windows Explorer, this really comes handy when you need it.
Of course, I’ve also changed the session.savepath and since PHP uses garbage collection every 24 minutes, so this left over session problem is fixed as well.