install.php to install PunBB first.'); // Record the start time (will be used to calculate the generation time for the page) list($usec, $sec) = explode(' ', microtime()); $pun_start = ((float)$usec + (float)$sec); // Make sure PHP reports all errors except E_NOTICE. PunBB supports E_ALL, but a lot of scripts it may interact with, do not. error_reporting(E_ALL); // Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings) setlocale(LC_CTYPE, 'C'); // If the cache directory is not specified, we use the default setting if (!defined('PUN_CACHE_DIR')) define('PUN_CACHE_DIR', PUN_ROOT.'cache/'); // Construct REQUEST_URI if it isn't set if (!isset($_SERVER['REQUEST_URI'])) $_SERVER['REQUEST_URI'] = (isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : '').'?'.(isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : ''); // Load DB abstraction layer and connect require PUN_ROOT.'include/dblayer/common_db.php'; // Start a transaction $pun_db->start_transaction(); // Load cached config if (file_exists(PUN_CACHE_DIR.'cache_config.php')) include PUN_CACHE_DIR.'cache_config.php'; if (!defined('PUN_CONFIG_LOADED')) { require_once PUN_ROOT.'include/cache.php'; generate_config_cache(); require PUN_CACHE_DIR.'cache_config.php'; } // Load hooks if (file_exists(PUN_CACHE_DIR.'cache_hooks.php')) include PUN_CACHE_DIR.'cache_hooks.php'; if (!defined('PUN_HOOKS_LOADED')) { require_once PUN_ROOT.'include/cache.php'; generate_hooks_cache(); require PUN_CACHE_DIR.'cache_hooks.php'; } define('PUN_ESSENTIALS_LOADED', 1);