|
|
|
@ -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; |
|
|
|
|