} $_SESSION['userID'] = 1; } } // }}} $KTInit = new KTInit(); $KTInit->initConfig(); $KTInit->setupI18n(); //==================================== define('KTLOG_CACHE', false); if (isset($GLOBALS['kt_test'])) { $KTInit->initTesting(); } $oKTConfig = KTConfig::getSingleton(); if ($oKTConfig->get('CustomErrorMessages/customerrormessages') == 'on') { $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();