aboutsummaryrefslogtreecommitdiff
path: root/lib/lib_install.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-11-06 14:06:02 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-11-06 14:06:02 +0100
commit6a7b5fea3ec301214527f4d8c888cca11d9125e5 (patch)
tree00d7d71d6015e78b036746e65d62eb5fc8755b0f /lib/lib_install.php
parent60941b9a40731be6f06d9422744cbba27982b6f3 (diff)
parent1a4fdfb1be7b638f5bfd1011e0f81f5814591474 (diff)
Merge branch 'FreshRSS/dev' into git-update
Diffstat (limited to 'lib/lib_install.php')
-rw-r--r--lib/lib_install.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/lib_install.php b/lib/lib_install.php
index 0e7b7f036..dd8090bcd 100644
--- a/lib/lib_install.php
+++ b/lib/lib_install.php
@@ -54,8 +54,8 @@ function generateSalt() {
function checkDb(&$dbOptions) {
$dsn = '';
+ $driver_options = null;
try {
- $driver_options = null;
switch ($dbOptions['type']) {
case 'mysql':
include_once(APP_PATH . '/SQL/install.sql.mysql.php');
@@ -99,8 +99,12 @@ function checkDb(&$dbOptions) {
default:
return false;
}
+
+ $c = new PDO($dsn, $dbOptions['user'], $dbOptions['password'], $driver_options);
+ $res = $c->query('SELECT 1');
} catch (PDOException $e) {
$dsn = '';
+ syslog(LOG_DEBUG, 'FreshRSS SQL warning: ' . $e->getMessage());
$dbOptions['error'] = $e->getMessage();
}
$dbOptions['dsn'] = $dsn;