try again in a few minutes or contact the website administrator.'); ?>
webtrees.net.'); ?>
. */ namespace Fisharebest\Webtrees; use PDO; use PDOException; define('WT_SCRIPT_NAME', 'site-unavailable.php'); // We use some PHP5.5 features, but need to run on older servers if (version_compare(PHP_VERSION, '5.4', '<')) { require WT_ROOT . 'includes/php_53_compatibility.php'; } require 'vendor/autoload.php'; // This script does not load session.php. // session.php won’t run until a configuration file and database connection exist... // This next block of code is a minimal version of session.php define('WT_WEBTREES', 'webtrees'); define('WT_BASE_URL', ''); define('WT_ROOT', ''); define('WT_DATA_DIR', realpath('data') . DIRECTORY_SEPARATOR); define('WT_MODULES_DIR', 'modules_v3/'); // No configuration file? Start the setup wizard if (!file_exists(WT_DATA_DIR . 'config.ini.php')) { header('Location: setup.php'); return; } Session::start(); define('WT_LOCALE', I18N::init()); http_response_code(503); header('Content-Type: text/html; charset=UTF-8'); // The page which redirected here may have provided an error message. $messages = ''; foreach (FlashMessages::getMessages() as $message) { $messages .= '
' . Filter::escapeHtml($message->text) . ''; } // If we can't connect to the database at all, give the reason why $config_ini_php = parse_ini_file('data/config.ini.php'); if (is_array($config_ini_php) && array_key_exists('dbhost', $config_ini_php) && array_key_exists('dbport', $config_ini_php) && array_key_exists('dbuser', $config_ini_php) && array_key_exists('dbpass', $config_ini_php) && array_key_exists('dbname', $config_ini_php)) { try { new PDO('mysql:host=' . $config_ini_php['dbhost'] . ';port=' . $config_ini_php['dbport'] . ';dbname=' . $config_ini_php['dbname'], $config_ini_php['dbuser'], $config_ini_php['dbpass'], array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_CASE => PDO::CASE_LOWER, PDO::ATTR_AUTOCOMMIT => true)); } catch (PDOException $ex) { $messages .= '
' . I18N::translate('The database reported the following error message:') . '
'; $messages .= '' . $ex->getMessage() . ''; } } ?> >
try again in a few minutes or contact the website administrator.'); ?>
webtrees.net.'); ?>