/home
/deploy
/EHungry-9-simon
/PHP
/Global.php
///////////////////////////////////////////////////////////////////////////////
// Initializing session
ini_set('session.gc_maxlifetime', 3600);
ini_set('session.cookie_httponly', 1);
ini_set('session.cookie_secure', 1);
if (!SameSiteNoneBug\unsafe()) {
if (PHP_MINOR_VERSION >= 3) { //TODO: remove after PHP 7.3
ini_set('session.cookie_samesite', 'None');
} else {
ini_set('session.cookie_path', '/; samesite=None'); //won't work on PHP 7.3
}
}
if (!stristr($_SERVER['REQUEST_URI'], '/ordermonitor') //doesn't need session
&& !stristr($_SERVER['REQUEST_URI'], '/tracking') //doesn't need session
&& !stristr($_SERVER['REQUEST_URI'], '/squareoauth') //start the session in the controller
&& !stristr($_SERVER['REQUEST_URI'], '/manager') //start the session when checking authorization
) {
session_start();
}
///////////////////////////////////////////////////////////////////////////////
// Initializing debugger pieces - session must be initialized first!
// TODO: figure out a way to enable IS_DEBUG through domains in production (i.e. in the customer pages of custom domain restaurants)
define(
'IS_DEBUG',
(DevLevel > 0 || isset($_SESSION['admin_id'])) //is a developer or a SuperAdmin
&& (isset($_REQUEST['debug']) || isset($_COOKIE['debug'])) //enabled debug, now or previously
&& (!isset($_REQUEST['debug']) || $_REQUEST['debug'] != '0') //and is passively using it, and not trying to disable
);
if (isset($_REQUEST['debug']) && $_REQUEST['debug'] == '0') {
deletecookie('debug', '/');
} elseif (IS_DEBUG) {
setcookie('debug', '1', time() + (60 * 60), '/');
}
App::initializeDebugbar();
Arguments
"LOADING Redis is loading the dataset in memory"
/home
/deploy
/EHungry-9-simon
/PHP
/Global.php
///////////////////////////////////////////////////////////////////////////////
// Initializing session
ini_set('session.gc_maxlifetime', 3600);
ini_set('session.cookie_httponly', 1);
ini_set('session.cookie_secure', 1);
if (!SameSiteNoneBug\unsafe()) {
if (PHP_MINOR_VERSION >= 3) { //TODO: remove after PHP 7.3
ini_set('session.cookie_samesite', 'None');
} else {
ini_set('session.cookie_path', '/; samesite=None'); //won't work on PHP 7.3
}
}
if (!stristr($_SERVER['REQUEST_URI'], '/ordermonitor') //doesn't need session
&& !stristr($_SERVER['REQUEST_URI'], '/tracking') //doesn't need session
&& !stristr($_SERVER['REQUEST_URI'], '/squareoauth') //start the session in the controller
&& !stristr($_SERVER['REQUEST_URI'], '/manager') //start the session when checking authorization
) {
session_start();
}
///////////////////////////////////////////////////////////////////////////////
// Initializing debugger pieces - session must be initialized first!
// TODO: figure out a way to enable IS_DEBUG through domains in production (i.e. in the customer pages of custom domain restaurants)
define(
'IS_DEBUG',
(DevLevel > 0 || isset($_SESSION['admin_id'])) //is a developer or a SuperAdmin
&& (isset($_REQUEST['debug']) || isset($_COOKIE['debug'])) //enabled debug, now or previously
&& (!isset($_REQUEST['debug']) || $_REQUEST['debug'] != '0') //and is passively using it, and not trying to disable
);
if (isset($_REQUEST['debug']) && $_REQUEST['debug'] == '0') {
deletecookie('debug', '/');
} elseif (IS_DEBUG) {
setcookie('debug', '1', time() + (60 * 60), '/');
}
App::initializeDebugbar();
/home
/deploy
/EHungry-9-simon
/Web
/index.php
<? /** @noinspection PhpIncludeInspection - to avoid marking dynamic includes */
//TODO create a «root»/_bootstrap.php which can be used by .psysh.php, tests/bootstrap.php and Web/index.php
require(dirname(__DIR__).'/PHP/base_consts.php');
require(dirname(__DIR__).'/PHP/autoloader.php');
initializeAutoLoader();
//disabled for now since we already have our own Alerts infrastructure, and it's not worth it to append another cloud provider to the startup of every freaking request; it's also not possible to catch errors this early if we depend on database checks, but we'll leave it here in case we change our mind?
//ErrorHandlers::sentryInit(); //early catch of errors and failsafe for smaller controllers, not in Sentry
App::startTime();
ErrorHandlers::register();
// Global.php is the core setup file for the application
App::debugbarTime('Global.php');
require(dirname(__DIR__) . '/PHP/Global.php');
App::debugbarTime('Global.php');
/** @var string $controller The main controller - defined at /PHP/Global.php */
App::debugbarTime('Sentry - controller');
ErrorHandlers::sentryInit($controller); //doesn't always do much - not every controller has a Sentry project
App::debugbarTime('Sentry - controller');
App::debugbarTime("controller: $controller");
apache_note('AppController', $controller);
if (file_exists(CORE_PATH."lib/helpers/$controller.php")) {
require CORE_PATH."lib/helpers/$controller.php";
}
require CORE_PATH."controllers/$controller.php";
App::debugbarTime("controller: $controller");
Arguments
"/home/deploy/EHungry-9-simon/PHP/Global.php"