// Skins directories define('LC_CUSTOMER_AREA_SKIN', LC_DIR_SKINS . 'default' . LC_DS . 'en' . LC_DS); define('LC_ADMIN_AREA_SKIN', LC_DIR_SKINS . 'admin' . LC_DS . 'en' . LC_DS); // Images subsystem settings define('LC_IMAGES_URL', 'images'); define('LC_IMAGES_CACHE_URL', LC_VAR_URL . '/images'); // Files define('LC_FILES_URL', 'files'); // OS define('LC_OS_NAME', preg_replace('/^([^ ]+)/', '\\1', PHP_OS)); define('LC_OS_CODE', strtolower(substr(LC_OS_NAME, 0, 3))); define('LC_OS_IS_WIN', LC_OS_CODE === 'win'); // Session type define('LC_SESSION_TYPE', 'Sql'); set_include_path(get_include_path() . PATH_SEPARATOR . LC_DIR_LIB); // Some common functions require_once LC_DIR_ROOT . 'Includes' . LC_DS . 'functions.php'; // Common error reporting settings $path = LC_DIR_LOG . 'php_errors.log.' . date('Y-m-d') . '.php'; if (!file_exists(dirname($path)) && is_writable(LC_DIR_VAR)) { \Includes\Utils\FileManager::mkdirRecursive(dirname($path)); } if ((!file_exists($path) || 16 > filesize($path)) && is_writable(dirname($path))) { file_put_contents($path, '<' . '?php die(1); ?' . '>' . "\n"); ini_set('error_log', $path); } ini_set('log_errors', true); unset($path); // Set default memory limit func_set_memory_limit('256M');
define('LC_ADMIN_AREA_SKIN', LC_DIR_SKINS . 'admin' . LC_DS . 'en' . LC_DS); // Images subsystem settings define('LC_IMAGES_URL', 'images'); define('LC_IMAGES_CACHE_URL', LC_VAR_URL . '/images'); // Files define('LC_FILES_URL', 'files'); define('LC_HORN', 'Ly93d3cueC1jYXJ0LmNvbS9pbWc'); // OS define('LC_OS_NAME', preg_replace('/^([^ ]+)/', '\\1', PHP_OS)); define('LC_OS_CODE', strtolower(substr(LC_OS_NAME, 0, 3))); define('LC_OS_IS_WIN', LC_OS_CODE === 'win'); // Session type define('LC_SESSION_TYPE', 'Sql'); set_include_path(get_include_path() . PATH_SEPARATOR . LC_DIR_LIB); // Some common functions require_once LC_DIR_ROOT . 'Includes' . LC_DS . 'functions.php'; // Common error reporting settings $path = LC_DIR_LOG . 'php_errors.log.' . date('Y-m-d') . '.php'; if (!file_exists(dirname($path)) && is_writable(LC_DIR_VAR)) { \Includes\Utils\FileManager::mkdirRecursive(dirname($path)); } if ((!file_exists($path) || 16 > filesize($path)) && is_writable(dirname($path))) { file_put_contents($path, '<' . '?php die(1); ?' . '>' . "\n"); ini_set('error_log', $path); } ini_set('log_errors', true); ini_set("auto_detect_line_endings", true); unset($path); // Set default memory limit func_set_memory_limit('128M');
| Ruslan R. Fazliev. All Rights Reserved. | +-----------------------------------------------------------------------------+ \*****************************************************************************/ # # $Id: init.php,v 1.92.2.1 2008/12/15 10:53:31 max Exp $ # # X-Cart initialization # if (!defined('XCART_START')) { header("Location: index.php"); die("Access denied"); } require_once $xcart_dir . "/prepare.php"; require_once $xcart_dir . "/include/func/func.core.php"; x_load('db', 'files', 'compat', 'gd', 'clean_urls'); func_set_memory_limit("16M"); # # Allow displaying content in functions, registered in register_shutdown_function() # $zlib_oc = ini_get("zlib.output_compression"); if (!empty($zlib_oc) || func_version_compare(phpversion(), "4.0.6") <= 0) { define("NO_RSFUNCTION", true); } unset($zlib_oc); if (!@is_readable($xcart_dir . "/config.php")) { func_show_error_page("Cannot read config!"); } require_once $xcart_dir . "/config.php"; @(include_once $xcart_dir . "/config.local.php"); # # This directive defines if some secured information would be shown on the WEB (file system structure, MySQL internal error)