php session files on windows version

38 views
Skip to first unread message

SoftWord

unread,
Apr 30, 2019, 5:51:56 AM4/30/19
to Fat-Free Framework
On windows version, there isn't any cron like linux that delete files on temp folder.

On some customer that require the windows version, I've a schtask script that at specific hour, remove session file older than 1 day.

What is best practice on windows to remove session files or my method is ok?

xfra35

unread,
Apr 30, 2019, 5:59:37 AM4/30/19
to Fat-Free Framework
Sounds good to me. Just make sure the retention period is consistent with the session.cookie_lifetime configuration.

xfra35

unread,
Apr 30, 2019, 6:05:33 AM4/30/19
to Fat-Free Framework
Just to clarify: by default, PHP doesn't rely on cron to clear old session files, but uses its own garbage collector system instead.

See the following variables:
So if you use your own scheduled task, just disable this system by setting session.gc_probability = 0
Message has been deleted

SoftWord

unread,
Apr 30, 2019, 10:14:52 AM4/30/19
to Fat-Free Framework
Thank you xfra :)
Reply all
Reply to author
Forward
0 new messages