]> git.wh0rd.org - tt-rss.git/blobdiff - include/db.php
simplify default global config, expand sanity_check messages
[tt-rss.git] / include / db.php
index 1401c089b0474e2cf4f64ee89ac2e8ebd736a1d7..7b2bd2a77c8ffc768d4160be3fbdde5225dc82c2 100644 (file)
@@ -22,7 +22,7 @@ function db_connect($host, $user, $pass, $db) {
                $link = pg_connect($string);
 
                if (!$link) {
-                       die("Connection failed: " . pg_last_error($link));
+                       die("Unable to connect to database (as $user to $host, database $db):" . pg_last_error());
                }
 
                return $link;
@@ -36,7 +36,7 @@ function db_connect($host, $user, $pass, $db) {
                        }
                        return $link;
                } else {
-                       die("Connection failed: " . mysql_error($link));
+                       die("Unable to connect to database (as $user to $host, database $db): " . mysql_error());
                }
        }
 }