From d4d35957ccbf6ff939add506b359aecbfb7b6181 Mon Sep 17 00:00:00 2001 From: Egorka Date: Mon, 3 Sep 2018 18:34:18 +0300 Subject: [PATCH] Setup path fix --- setup.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.php b/setup.php index 3b743c1..028c7d3 100644 --- a/setup.php +++ b/setup.php @@ -116,7 +116,7 @@ class Setup private function setConfigMySQL() { $mysql_line = 'mysql:host=' . $this->_db_host . ';dbname=' . $this->_db_name; - $file = 'common/config/main-local.php'; + $file = __DIR__ . '/common/config/main-local.php'; $content = file_get_contents($file); $content = preg_replace('/(("|\')dsn("|\')\s*=>\s*)(""|\'\')/', "\\1'$mysql_line'", $content); $content = preg_replace('/(("|\')username("|\')\s*=>\s*)(""|\'\')/', "\\1'$this->_db_user'", $content); @@ -139,7 +139,7 @@ class Setup echo Console::log('Domain must be set', 'red') . PHP_EOL; }; - $file = 'common/config/params-local.php'; + $file = __DIR__ . '/common/config/params-local.php'; $content = file_get_contents($file); $site_domain = $this->_http_protocol . '://' . $this->_domain;