Changeset View
Changeset View
Standalone View
Standalone View
core/kernel/startup.php
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Line(s) | |||||
echo 'Please use the installation script to fix the problem.<br/><br/>'; | echo 'Please use the installation script to fix the problem.<br/><br/>'; | ||||
$base_path = rtrim(preg_replace('/'.preg_quote(rtrim($admin_directory, '/'), '/').'$/', '', str_replace('\\', '/', dirname($_SERVER['PHP_SELF']))), '/'); | $base_path = rtrim(preg_replace('/'.preg_quote(rtrim($admin_directory, '/'), '/').'$/', '', str_replace('\\', '/', dirname($_SERVER['PHP_SELF']))), '/'); | ||||
echo '<a href="' . PROTOCOL . SERVER_NAME . $base_path . '/core/install.php">Go to installation script</a><br><br>'; | echo '<a href="' . PROTOCOL . SERVER_NAME . $base_path . '/core/install.php">Go to installation script</a><br><br>'; | ||||
flush(); | flush(); | ||||
exit; | exit; | ||||
} | } | ||||
if ( !file_exists(FULL_PATH . '/vendor/autoload.php') ) { | |||||
echo 'Cannot find an "/vendor/autoload.php" file, have you executed "composer install" command?<br/>'; | |||||
flush(); | |||||
exit; | |||||
} | |||||
// variable WebsitePath is auto-detected once during installation/upgrade | // variable WebsitePath is auto-detected once during installation/upgrade | ||||
define('BASE_PATH', $vars['WebsitePath']); | define('BASE_PATH', $vars['WebsitePath']); | ||||
define('APPLICATION_CLASS', isset($vars['ApplicationClass']) ? $vars['ApplicationClass'] : 'kApplication'); | define('APPLICATION_CLASS', isset($vars['ApplicationClass']) ? $vars['ApplicationClass'] : 'kApplication'); | ||||
define('APPLICATION_PATH', isset($vars['ApplicationPath']) ? $vars['ApplicationPath'] : '/core/kernel/application.php'); | define('APPLICATION_PATH', isset($vars['ApplicationPath']) ? $vars['ApplicationPath'] : '/core/kernel/application.php'); | ||||
if (isset($vars['WriteablePath'])) { | if (isset($vars['WriteablePath'])) { | ||||
define('WRITEABLE', FULL_PATH . $vars['WriteablePath']); | define('WRITEABLE', FULL_PATH . $vars['WriteablePath']); | ||||
▲ Show 20 Lines • Show All 101 Lines • ▼ Show 20 Line(s) | |||||
KERNEL_PATH . '/utility/event.php', | KERNEL_PATH . '/utility/event.php', | ||||
KERNEL_PATH . '/utility/logger.php', | KERNEL_PATH . '/utility/logger.php', | ||||
KERNEL_PATH . "/utility/factory.php", | KERNEL_PATH . "/utility/factory.php", | ||||
KERNEL_PATH . "/languages/phrases_cache.php", | KERNEL_PATH . "/languages/phrases_cache.php", | ||||
KERNEL_PATH . "/db/dblist.php", | KERNEL_PATH . "/db/dblist.php", | ||||
KERNEL_PATH . "/db/dbitem.php", | KERNEL_PATH . "/db/dbitem.php", | ||||
KERNEL_PATH . "/event_handler.php", | KERNEL_PATH . "/event_handler.php", | ||||
KERNEL_PATH . '/db/db_event_handler.php', | KERNEL_PATH . '/db/db_event_handler.php', | ||||
FULL_PATH . '/vendor/autoload.php', | |||||
); | ); | ||||
foreach ($includes as $a_file) { | foreach ($includes as $a_file) { | ||||
kUtil::includeOnce($a_file); | kUtil::includeOnce($a_file); | ||||
} | } | ||||
if (defined('DEBUG_MODE') && DEBUG_MODE && isset($debugger)) { | if (defined('DEBUG_MODE') && DEBUG_MODE && isset($debugger)) { | ||||
$debugger->AttachToApplication(); | $debugger->AttachToApplication(); | ||||
} | } | ||||
if( !function_exists('adodb_mktime') ) { | if( !function_exists('adodb_mktime') ) { | ||||
include_once(KERNEL_PATH . '/utility/adodb-time.inc.php'); | include_once(KERNEL_PATH . '/utility/adodb-time.inc.php'); | ||||
} | } | ||||
// system users | // system users | ||||
define('USER_ROOT', -1); | define('USER_ROOT', -1); | ||||
define('USER_GUEST', -2); | define('USER_GUEST', -2); | ||||
No newline at end of file |