From eff41ce18839f933e742fd96d15581e771af6e1f Mon Sep 17 00:00:00 2001 From: Gilles FELIX Date: Thu, 25 Feb 2021 08:46:49 +0100 Subject: [PATCH] Assume that TTRSS_PATH has no trailing slash in ttrss-configure-db.php, as in setup-ttrss.sh --- root/srv/ttrss-configure-db.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/root/srv/ttrss-configure-db.php b/root/srv/ttrss-configure-db.php index 9eaa815..062ec1d 100644 --- a/root/srv/ttrss-configure-db.php +++ b/root/srv/ttrss-configure-db.php @@ -3,8 +3,8 @@ include '/srv/ttrss-utils.php'; -$confpath = env('TTRSS_PATH', '/var/www/ttrss/'); -$conffile = $confpath . 'config.php'; +$confpath = env('TTRSS_PATH', '/var/www/ttrss'); +$conffile = $confpath . '/config.php'; $ename = 'DB'; $eport = 5432; @@ -73,7 +73,8 @@ try { } catch (PDOException $e) { echo 'Database table not found, applying schema... ' . PHP_EOL; - $schema = file_get_contents($confpath . 'schema/ttrss_schema_' . $config['DB_TYPE'] . '.sql'); + + $schema = file_get_contents($confpath . '/schema/ttrss_schema_' . $config['DB_TYPE'] . '.sql'); $schema = preg_replace('/--(.*?);/', '', $schema); $schema = preg_replace('/[\r\n]/', ' ', $schema); $schema = trim($schema, ' ;');