summaryrefslogtreecommitdiff
path: root/install.php
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-07-25 00:19:12 -0400
committerCraig Andrews <candrews@integralblue.com>2009-07-25 00:19:12 -0400
commitf86faaf341ee6e6e8cfd264e1d645cc0d964d85b (patch)
tree5edee8a1dd8559ef1250a3800884e811ebf41e23 /install.php
parent70cc09a5c2863f4a9a24f65db8830146becbc72a (diff)
If cannot connect, then stop the installation
Diffstat (limited to 'install.php')
-rw-r--r--install.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/install.php b/install.php
index d5e8e8b61..901e502f1 100644
--- a/install.php
+++ b/install.php
@@ -242,6 +242,12 @@ function pgsql_db_installer($host, $database, $username, $password, $sitename) {
updateStatus("Starting installation...");
updateStatus("Checking database...");
$conn = pg_connect($connstring);
+
+ if ($conn ===false) {
+ updateStatus("Failed to connect to database: $connstring");
+ showForm();
+ return false;
+ }
//ensure database encoding is UTF8
$record = pg_fetch_object(pg_query($conn, 'SHOW server_encoding'));