<?php
-require('Symfony/Component/Dotenv/autoload.php');
-
function loadSettings($sProjectDir)
{
@define('CONST_InstallDir', $sProjectDir);
// set of settings.
defined('CONST_DataDir') or define('CONST_DataDir', $_SERVER['NOMINATIM_DATADIR']);
defined('CONST_BinDir') or define('CONST_BinDir', $_SERVER['NOMINATIM_BINDIR']);
-
- $dotenv = new \Symfony\Component\Dotenv\Dotenv();
- $dotenv->load(CONST_DataDir.'/settings/env.defaults');
-
- if (file_exists($sProjectDir.'/.env')) {
- $dotenv->load($sProjectDir.'/.env');
- }
}
function getSetting($sConfName, $sDefault = null)
function getSettingConfig($sConfName, $sSystemConfig)
{
- $sValue = $_ENV['NOMINATIM_'.$sConfName];
+ $sValue = $_SERVER['NOMINATIM_'.$sConfName];
if (!$sValue) {
return CONST_DataDir.'/settings/'.$sSystemConfig;