[dev] [PATCH] Session cleanup for Kronolith's reminders.php

Joel Smith js-horde at jk1.net
Sat Jun 11 16:33:48 PDT 2005


Hi Horde Folks,
Currently when Kronolith's reminders.php script is run from cron (or otherwise)
it creates a session.  This session doesn't get cleaned up until it's old enough
to get cleaned up by PHP's session garbage collection.  This is fine, but
there's no reason not to clean these sessions up since they don't get re-used
and since there's usually one per minute (which clutters up the session dir or
table or whetever is being used to store sessions).

So this patch just adds some cleanup at the end of the script so that PHP will
delete the session.

Hope it helps, and thanks for all the great apps.
Joel Smith
-------------- next part --------------
Index: reminders.php
===================================================================
RCS file: /repository/kronolith/scripts/reminders.php,v
retrieving revision 1.18
diff -u -r1.18 reminders.php
--- reminders.php	3 Jan 2005 14:35:13 -0000	1.18
+++ reminders.php	11 Jun 2005 22:37:17 -0000
@@ -53,3 +53,7 @@
 
 // Start the daemon going.
 $reminder->run();
+
+// Delete the session and auth info
+Auth::clearAuth();
+ at session_destroy();


More information about the dev mailing list