Fix. Create DB during web install.
This commit is contained in:
parent
6fa7dcfa30
commit
0c828deba6
|
|
@ -275,9 +275,9 @@ include "root.php";
|
||||||
try {
|
try {
|
||||||
if (strlen($this->db_port) == 0) { $this->db_port = "5432"; }
|
if (strlen($this->db_port) == 0) { $this->db_port = "5432"; }
|
||||||
if (strlen($this->db_host) > 0) {
|
if (strlen($this->db_host) > 0) {
|
||||||
$this->dbh = new PDO("pgsql:host={$this->db_host} port={$this->db_port} user={".$this->db_create_username."} password={".$this->db_create_password."} dbname=template1");
|
$this->dbh = new PDO("pgsql:host={$this->db_host} port={$this->db_port} user={$this->db_create_username} password={$this->db_create_password} dbname=template1");
|
||||||
} else {
|
} else {
|
||||||
$this->dbh = new PDO("pgsql:host=localhost port={$this->db_port} user={".$this->db_create_username."} password={".$this->db_create_password."} dbname=template1");
|
$this->dbh = new PDO("pgsql:host=localhost port={$this->db_port} user={$this->db_create_username} password={$this->db_create_password} dbname=template1");
|
||||||
}
|
}
|
||||||
} catch (PDOException $error) {
|
} catch (PDOException $error) {
|
||||||
throw new Exception("error connecting to database: " . $error->getMessage());
|
throw new Exception("error connecting to database: " . $error->getMessage());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue