// Include the non-dynamic constants require TITANIA_ROOT . 'includes/constants.' . PHP_EXT; // Include core classes require TITANIA_ROOT . 'includes/core/phpbb.' . PHP_EXT; require TITANIA_ROOT . 'includes/core/titania.' . PHP_EXT; // Include our core functions titania::_include('functions'); set_exception_handler('titania_exception_handler'); // Set up our auto-loader spl_autoload_register(array('titania', 'autoload')); // Read config.php file // 2 separate locations possible: within Titania directory and just outside of it. if (file_exists(TITANIA_ROOT . 'config.' . PHP_EXT)) { titania::read_config_file(TITANIA_ROOT . 'config.' . PHP_EXT); } else { titania::read_config_file(TITANIA_ROOT . '../config.' . PHP_EXT); } // Include the dynamic constants (after reading the Titania config file, but before loading the phpBB common file) titania::_include('dynamic_constants'); // Decode the request titania_url::decode_request(); // Include common phpBB files and functions. if (!file_exists(PHPBB_ROOT_PATH . 'common.' . PHP_EXT)) { die('<p>No phpBB installation found. Check the Titania configuration file.</p>'); } if (!defined('PHPBB_INCLUDED')) { require PHPBB_ROOT_PATH . 'common.' . PHP_EXT; } // Initialise phpBB phpbb::initialise(); // If the database is not installed or outdated redirect to the installer