<?php require_once 'server/settings.global.php'; require_once 'server/settings.project.php'; require_once 'server/settings.host.php'; /********************************************************/ foreach ($_ENV['PROJECT_SETTINGS'] as $sKey => $sValue) { $_ENV['SETTINGS'][$sKey] = $sValue; } foreach ($_ENV['HOST_SETTINGS'] as $sKey => $sValue) { $_ENV['SETTINGS'][$sKey] = $sValue; } /********************************************************/ session_set_cookie_params(M::SESSION_TTL()); session_name($_ENV['SETTINGS']['SESSION_NAME']); session_start(); mb_internal_encoding('UTF-8'); $_ENV['SETTINGS']['BUILD_ID'] = ''; if (file_exists($_ENV['SETTINGS']['PROJECT_ROOT'] . '/build')) { $_ENV['SETTINGS']['BUILD_ID'] = file_get_contents($_ENV['SETTINGS']['PROJECT_ROOT'] . '/build'); } $_ENV['LAST_EVALED_FILE'] = null; $_ENV['EVAL_ERROR'] = false; $_ENV['SETTINGS']['FILE_LOG_PHP'] = $_ENV['SETTINGS']['PROJECT_ROOT'] . '/' . $_ENV['SETTINGS']['PATH_LOGS'] . '/' . $_ENV['SETTINGS']['FILE_LOG_PHP']; $_ENV['SETTINGS']['FILE_LOG_PHANTOM'] = $_ENV['SETTINGS']['PROJECT_ROOT'] . '/' . $_ENV['SETTINGS']['PATH_LOGS'] . '/' . $_ENV['SETTINGS']['FILE_LOG_PHANTOM']; $_ENV['SETTINGS']['FILE_LOG_CSS'] = $_ENV['SETTINGS']['PROJECT_ROOT'] . '/' . $_ENV['SETTINGS']['PATH_LOGS'] . '/' . $_ENV['SETTINGS']['FILE_LOG_CSS']; $_ENV['SETTINGS']['PROTOCOL'] = Request::isHttps() ? 'https' : 'http'; $_ENV['SETTINGS']['HTTP_ROOT'] = 'http://' . $_ENV['SETTINGS']['HOST'] . ($_ENV['SETTINGS']['HTTP_PORT'] != 80 ? ':' . $_ENV['SETTINGS']['HTTP_PORT'] : '') . $_ENV['SETTINGS']['SITE_PATH']; $_ENV['SETTINGS']['HTTPS_ROOT'] = 'https://' . $_ENV['SETTINGS']['HOST'] . ($_ENV['SETTINGS']['HTTPS_PORT'] != 443 ? ':' . $_ENV['SETTINGS']['HTTPS_PORT'] : '') . $_ENV['SETTINGS']['SITE_PATH']; $_ENV['SETTINGS']['AGNOSTIC_ROOT'] = '//' . $_ENV['SETTINGS']['HOST'] . $_ENV['SETTINGS']['SITE_PATH']; // $_ENV['SETTINGS']['REQUEST_PATH'] = isset($_SERVER['REQUEST_URI'])