Viewing File: /usr/local/cpanel/base/frontend/jupiter/ls_web_cache_manager/landing/default/index.php

<?php

/** ******************************************
 * LiteSpeed Web Cache Management Plugin for cPanel
 *
 * @author    Michael Alegre
 * @copyright 2018-2023 LiteSpeed Technologies, Inc.
 * ******************************************* */

use LsUserPanel\CPanelWrapper;
use LsUserPanel\Ls_WebCacheMgr_Controller;
use LsUserPanel\Lsc\UserLSCMException;
use LsUserPanel\Lsc\UserLogger;

CPanelWrapper::init();

try {
    /**
     * "new Ls_WebCacheMgr_Controller()" call here throws UserLSCMException.
     */
    $app = new Ls_WebCacheMgr_Controller();
    $app->run();
}
catch ( UserLSCMException $e ) {
    $msg = $e->getMessage();

    try {
        UserLogger::logMsg($msg, UserLogger::L_ERROR);
    }
    catch ( UserLSCMException $e ) {
        $msg .= "\n({$e->getMessage()})";
    }

    header("status: 500\n");
    echo "<h1>$msg</h1>";
}

CPanelWrapper::getCpanelObj()->end();
Back to Directory File Manager