$KTInit->catchFatalErrors(); } if (phpversion() < 5) { $rootUrl = $KTInit->guessRootUrl(); $sErrorPage = 'http://' . $_SERVER['HTTP_HOST'] . $rootUrl . '/' . 'customerrorpage.php'; session_start(); $_SESSION['sErrorMessage'] = 'KnowledgeTree now requires that PHP version 5 is installed. PHP version 4 is no longer supported.'; header('location:' . $sErrorPage); exit(0); } $KTInit->setupServerVariables(); // instantiate log $loggingSupport = $KTInit->setupLogging(); // Send all PHP errors to a file (and maybe a window) set_error_handler(array('KTInit', 'handlePHPError')); $KTInit->setupRandomSeed(); $GLOBALS['KTRootUrl'] = $oKTConfig->get('KnowledgeTree/rootUrl'); require_once KT_LIB_DIR . '/database/lookup.inc'; // table mapping entries include 'tableMappings.inc'; $default->systemVersion = trim(file_get_contents(KT_DIR . '/docs/VERSION.txt')); $default->versionName = trim(file_get_contents(KT_DIR . '/docs/VERSION-NAME.txt')); $KTInit->cleanGlobals(); $KTInit->cleanMagicQuotes(); // site map definition require_once KT_DIR . '/config/siteMap.inc'; require_once KT_LIB_DIR . '/session/Session.inc'; require_once KT_LIB_DIR . '/session/control.inc'; require_once KT_LIB_DIR . '/plugins/pluginutil.inc.php'; if ($checkup !== true) { // Replace function later