Fixed PHP Fatal error when config-user.php missing
This commit is contained in:
parent
f238b7edaa
commit
921b30e47d
|
@ -25,4 +25,8 @@ $config['db_name'] = "pdnsmanager";
|
|||
$config['nonce_lifetime'] = 15;
|
||||
//Number of rows in domain overview
|
||||
$config['domain_rows'] = 15;
|
||||
require 'config-user.php';
|
||||
|
||||
// If config-user.php does not exist, redirect to the setup page
|
||||
if(!(include 'config-user.php')) {
|
||||
Header("Location: install.php");
|
||||
}
|
||||
|
|
|
@ -18,5 +18,5 @@ try {
|
|||
$db = new PDO($config['db_type'].":dbname=".$config['db_name'].";host=".$config['db_host'].";port=".strval($config['db_port']), $config['db_user'], $config['db_password']);
|
||||
}
|
||||
catch (PDOException $e) {
|
||||
die("Connection to database failed");
|
||||
die("Connection to the database failed. There is an error in the database configuration.");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue