} // In case $phpbb_adm_relative_path is not set (in case of an update), use the default. $phpbb_adm_relative_path = isset($phpbb_adm_relative_path) ? $phpbb_adm_relative_path : 'adm/'; $phpbb_admin_path = defined('PHPBB_ADMIN_PATH') ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path; // Include files require $phpbb_root_path . 'includes/functions.' . $phpEx; require $phpbb_root_path . 'includes/functions_content.' . $phpEx; require $phpbb_root_path . 'includes/constants.' . $phpEx; include $phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx; require $phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx; // Set PHP error handler to ours set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler'); // Set up container (must be done here because extensions table may not exist) $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx); $phpbb_container_builder->set_use_extensions(false); $phpbb_container_builder->set_use_kernel_pass(false); $phpbb_container_builder->set_dump_container(false); $phpbb_container = $phpbb_container_builder->get_container(); // set up caching $cache = $phpbb_container->get('cache'); // Instantiate some basic classes $phpbb_dispatcher = $phpbb_container->get('dispatcher'); $request = $phpbb_container->get('request'); $user = $phpbb_container->get('user'); $auth = $phpbb_container->get('auth'); $db = $phpbb_container->get('dbal.conn'); $phpbb_log = $phpbb_container->get('log'); // make sure request_var uses this request instance request_var('', 0, false, false, $request); // "dependency injection" for a function // Grab global variables, re-cache if necessary