forked from hans/Nominatim
replace database settings with dotenv variant
As we can't refer to the project root dir in the module path, the module path may now also be a relative directory which is then taken as being relative to the project root path. Moves the checkModulePresence() function into the Setup class, so that it can work on the computed absolute module path.
This commit is contained in:
@@ -35,7 +35,7 @@ if ($oDB->checkConnection()) {
|
||||
echo <<< END
|
||||
Hints:
|
||||
* Is the database server started?
|
||||
* Check the CONST_Database_DSN variable in build/settings/local.php
|
||||
* Check the NOMINATIM_DATABASE_DSN variable in your local .env
|
||||
* Try connecting to the database with the same settings
|
||||
|
||||
END;
|
||||
|
||||
@@ -147,7 +147,7 @@ if ($aCMDResult['wiki-import']) {
|
||||
. ";\n",
|
||||
pg_escape_string($aPair[0]),
|
||||
pg_escape_string($aPair[1]),
|
||||
CONST_Database_Web_User
|
||||
getSetting('DATABASE_WEBUSER');
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ $oDB = new Nominatim\DB();
|
||||
$oDB->connect();
|
||||
$fPostgresVersion = $oDB->getPostgresVersion();
|
||||
|
||||
$aDSNInfo = Nominatim\DB::parseDSN(CONST_Database_DSN);
|
||||
$aDSNInfo = Nominatim\DB::parseDSN(getSetting('DATABASE_DSN'));
|
||||
if (!isset($aDSNInfo['port']) || !$aDSNInfo['port']) $aDSNInfo['port'] = 5432;
|
||||
|
||||
// cache memory to be used by osm2pgsql, should not be more than the available memory
|
||||
|
||||
Reference in New Issue
Block a user