Line 12 | Line 12 |
---|
*/
/**
|
*/
/**
|
* Minimum Requirement: PHP 7.1.3
| * Minimum Requirement: PHP 7.2.0
|
*/
if (!defined('IN_PHPBB'))
| */
if (!defined('IN_PHPBB'))
|
Line 51 | Line 51 |
---|
$server_port = 443; }
|
$server_port = 443; }
|
$script_name = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF'); if (!$script_name) { $script_name = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI'); }
// $phpbb_root_path accounts for redirects from e.g. /adm $script_path = trim(dirname($script_name)) . '/' . $phpbb_root_path . 'install/app.' . $phpEx; // Replace any number of consecutive backslashes and/or slashes with a single slash // (could happen on some proxy setups and/or Windows servers) $script_path = preg_replace('#[\\\\/]{2,}#', '/', $script_path);
| $script_path = phpbb_get_install_redirect($phpbb_root_path, $phpEx);
|
// Eliminate . and .. from the path
|
// Eliminate . and .. from the path
|
require($phpbb_root_path . 'phpbb/filesystem.' . $phpEx);
| require($phpbb_root_path . 'phpbb/filesystem/filesystem.' . $phpEx);
|
$phpbb_filesystem = new phpbb\filesystem\filesystem(); $script_path = $phpbb_filesystem->clean_path($script_path);
| $phpbb_filesystem = new phpbb\filesystem\filesystem(); $script_path = $phpbb_filesystem->clean_path($script_path);
|
Line 96 | Line 86 |
---|
require($phpbb_root_path . 'includes/constants.' . $phpEx); require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
|
require($phpbb_root_path . 'includes/constants.' . $phpEx); require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
|
| // Registered before building the container so the development environment stay capable of intercepting // the container builder exceptions.
|
if (PHPBB_ENVIRONMENT === 'development') { \phpbb\debug\debug::enable();
| if (PHPBB_ENVIRONMENT === 'development') { \phpbb\debug\debug::enable();
|
Line 112 | Line 104 |
---|
try { $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_root_path, $phpEx);
|
try { $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_root_path, $phpEx);
|
| // Check that cache directory is writable before trying to build container $cache_dir = $phpbb_container_builder->get_cache_dir(); if (file_exists($cache_dir) && !is_writable($phpbb_container_builder->get_cache_dir())) { die('Unable to write to the cache directory path "' . $cache_dir . '". Ensure that the web server user can write to the cache folder.'); }
|
$phpbb_container = $phpbb_container_builder->with_config($phpbb_config_php_file)->get_container(); } catch (InvalidArgumentException $e)
| $phpbb_container = $phpbb_container_builder->with_config($phpbb_config_php_file)->get_container(); } catch (InvalidArgumentException $e)
|
Line 127 | Line 127 |
---|
{ throw $e; }
|
{ throw $e; }
|
| }
if ($phpbb_container->getParameter('debug.error_handler')) { \phpbb\debug\debug::enable();
|
}
$phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));
| }
$phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));
|