Last active
November 5, 2025 20:27
-
-
Save matdave/7fe805a5bc578d5b182476966f739bb2 to your computer and use it in GitHub Desktop.
MODX GC Handler
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $tstart= microtime(true); | |
| @include(dirname(__FILE__) . '/config.core.php'); | |
| if (!defined('MODX_CORE_PATH')) define('MODX_CORE_PATH', dirname(__FILE__) . '/core/'); | |
| if (!@include_once (MODX_CORE_PATH . "model/modx/modx.class.php")) { | |
| die(); | |
| } | |
| if (!@include_once (MODX_CORE_PATH . "model/modx/modsessionhandler.class.php")) { | |
| die(); | |
| } | |
| $modx= new modX(); | |
| $modx->startTime= $tstart; | |
| $modx->initialize(); | |
| $sessionHandler = new modSessionHandler($modx); | |
| if ($sessionHandler) { | |
| $sessionHandler->gc(0); | |
| } | |
| session_gc(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment