2013-11-09 11:19:21 +01:00
|
|
|
<?php
|
2013-11-10 12:51:41 +01:00
|
|
|
|
2013-11-10 02:55:08 +01:00
|
|
|
// Define base dir
|
2013-11-09 11:19:21 +01:00
|
|
|
define('ManiaControlDir', __DIR__);
|
|
|
|
|
|
|
|
// Set process settings
|
|
|
|
ini_set('memory_limit', '128M');
|
|
|
|
if (function_exists('date_default_timezone_get') && function_exists('date_default_timezone_set')) {
|
|
|
|
date_default_timezone_set(@date_default_timezone_get());
|
|
|
|
}
|
|
|
|
|
|
|
|
// Error handling
|
2013-12-09 13:07:03 +01:00
|
|
|
ini_set('log_errors', true);
|
|
|
|
ini_set('display_errors', '1');
|
2013-11-09 11:19:21 +01:00
|
|
|
ini_set('error_reporting', -1);
|
2013-12-09 13:07:03 +01:00
|
|
|
ini_set('display_startup_errors', true);
|
2013-11-10 17:23:00 +01:00
|
|
|
if (!is_dir('logs')) {
|
|
|
|
mkdir('logs');
|
|
|
|
}
|
|
|
|
ini_set('error_log', 'logs/ManiaControl_' . getmypid() . '.log');
|
2013-11-09 11:19:21 +01:00
|
|
|
|
2013-11-10 02:55:08 +01:00
|
|
|
// Load ManiaControl class
|
2013-11-12 15:48:25 +01:00
|
|
|
require_once __DIR__ . '/core/ManiaControl.php';
|
2013-11-10 02:55:08 +01:00
|
|
|
|
2013-11-09 11:19:21 +01:00
|
|
|
// Start ManiaControl
|
2013-12-09 13:07:03 +01:00
|
|
|
error_log('Loading ManiaControl v' . ManiaControl\ManiaControl::VERSION . '...');
|
2013-11-09 11:19:21 +01:00
|
|
|
|
2013-12-09 13:07:03 +01:00
|
|
|
$maniaControl = new ManiaControl\ManiaControl();
|
2013-11-10 02:55:08 +01:00
|
|
|
$maniaControl->run();
|