Ejemplo n.º 1
0
define('PIWIK_INCLUDE_PATH', dirname(__FILE__));
@ignore_user_abort(true);
if (@(include "Version.php") === false || !class_exists('Piwik_Version')) {
    set_include_path(PIWIK_INCLUDE_PATH . '/core' . PATH_SEPARATOR . PIWIK_INCLUDE_PATH . '/libs' . PATH_SEPARATOR . PIWIK_INCLUDE_PATH . '/plugins' . PATH_SEPARATOR . get_include_path());
}
require_once "Common.php";
require_once "PluginsManager.php";
require_once "Tracker.php";
require_once "Tracker/Config.php";
require_once "Tracker/Action.php";
require_once "Cookie.php";
require_once "Tracker/Db.php";
require_once "Tracker/Visit.php";
require_once "Tracker/GoalManager.php";
session_cache_limiter('nocache');
ob_start();
if ($GLOBALS['PIWIK_TRACKER_DEBUG'] === true) {
    date_default_timezone_set(date_default_timezone_get());
    require_once "core/ErrorHandler.php";
    require_once "core/ExceptionHandler.php";
    set_error_handler('Piwik_ErrorHandler');
    set_exception_handler('Piwik_ExceptionHandler');
    printDebug($_GET);
    Piwik_Tracker_Db::enableProfiling();
    Piwik::createConfigObject();
    Piwik::createLogObject();
}
$process = new Piwik_Tracker();
$process->main();
ob_end_flush();
printDebug($_COOKIE);
Ejemplo n.º 2
0
 /**
  * Overwrite the global GET/POST/COOKIE variables and set the fake ones @see setFakeRequest()
  * Reads the configuration file but disables write to this file
  * Creates the database object & enable profiling by default (@see disableProfiler())
  *
  */
 public function __construct()
 {
     $_COOKIE = $_GET = $_POST = array();
     // init GET and REQUEST to the empty array
     $this->setFakeRequest();
     Piwik::createConfigObject(PIWIK_INCLUDE_PATH . '/config/config.ini.php');
     Zend_Registry::get('config')->disableSavingConfigurationFileUpdates();
     // setup database
     Piwik::createDatabaseObject();
     Piwik_Tracker_Db::enableProfiling();
     $this->timestampToUse = time();
 }