private function init() { $this->handleFatalErrors(); \Piwik\FrontController::createConfigObject(); if ($this->isDebugModeEnabled()) { ErrorHandler::registerErrorHandler(); ExceptionHandler::setUp(); Common::printDebug("Debug enabled - Input parameters: "); Common::printDebug(var_export($_GET, true)); } }
require_once PIWIK_INCLUDE_PATH . '/core/Filesystem.php'; require_once PIWIK_INCLUDE_PATH . '/core/Cookie.php'; session_cache_limiter('nocache'); @date_default_timezone_set('UTC'); if (!defined('PIWIK_ENABLE_TRACKING') || PIWIK_ENABLE_TRACKING) { ob_start(); } if ($GLOBALS['PIWIK_TRACKER_DEBUG'] === true) { require_once PIWIK_INCLUDE_PATH . '/core/Loader.php'; require_once PIWIK_INCLUDE_PATH . '/core/Error.php'; \Piwik\Error::setErrorHandler(); require_once PIWIK_INCLUDE_PATH . '/core/ExceptionHandler.php'; \Piwik\ExceptionHandler::setUp(); $timer = new Timer(); Common::printDebug("Debug enabled - Input parameters: <br/>" . var_export($_GET, true)); \Piwik\Tracker\Db::enableProfiling(); \Piwik\FrontController::createConfigObject(); } if (!defined('PIWIK_ENABLE_TRACKING') || PIWIK_ENABLE_TRACKING) { $process = new Tracker(); try { $process->main(); } catch (Exception $e) { echo "Error:" . $e->getMessage(); } ob_end_flush(); if ($GLOBALS['PIWIK_TRACKER_DEBUG'] === true) { Common::printDebug($_COOKIE); Common::printDebug($timer); } }