', '', '', 'Site Unavailable - webtrees', '', '', '

', i18n::translate('webtrees site unavailable'), '

', '
', '

', i18n::translate('Oops! The webserver is unable to connect to the database server. It could be busy, undergoing maintenance, or simply broken. You should try again in a few minutes or contact the website administrator.'), '

'; $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 { $dbh=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) { echo '

', i18n::translate('The database reported the following error message:'), '

'; echo '
', $ex->getMessage(), '
'; } } echo i18n::translate('If you are the website administrator, you should check that:'); echo '
    '; echo '
  1. ', i18n::translate('the database connection settings in the file /data/config.ini.php are still correct'), '
  2. '; echo '
  3. ', i18n::translate('the directory /data and the file /data/config.ini.php have access permissions that allow the webserver to read them'), '
  4. '; echo '
  5. ', i18n::translate('you can connect to the database using other applications, such as phpmyadmin'), '
  6. '; echo '
'; echo '

', i18n::translate('If you cannot resolve the problem yourself, you can ask for help on the forums at webtrees.net'), '

'; echo '
'; echo ''; echo '';