Sescle

Sescle is a utility which monitors the PHP session directory and removes expired sessions. This is suitable for high-load or high-security situations where sessions files must be removed frequently and on-time.

It works hand in hand with PHP and will auto-configure based on the values or defaults PHP is using on your server, in most cases it can be run out of the box with no options and will function perfectly.

Download

Building

The following components are required to do a full build:

All the above requirements are in the Gentoo portage tree, and may or may not be available as standard packages for other Linux distributions.

There is no installation procedure provided, but the `sescle` executable and 'sescle.1' man page can be installed by hand.

Security

As of version 0.1 there are known race conditions which may lead to arbitrary file deletion, this is caused by lazy/simple code not accounting for symlinks.

Until these issues are fixed, it's highly recommended that you only run this where a single user will be storing session files, and definately not in a shared hosting environment.

Bugs

Please submit bug reports, patches or improvements to harry.roberts@midnight-labs.org.

License

This software was developed by Harry Roberts while working at Telappliant Ltd., a leading UK based VoIP provider.

Copyright (c) 2008 Telappliant Ltd.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Links

Please subscribe to the PHP Session Cleaner project at Freshmeat for updates.