diff --git a/config-sample.yaml b/config-sample.yaml index ec46f9e..42e7108 100644 --- a/config-sample.yaml +++ b/config-sample.yaml @@ -25,7 +25,7 @@ configInfo: maximumRecords: 100 setting: {} supports: {} -dbConnStr: host=127.0.0.1 port=5432 user=fcs dbname=www-data password=*** +dbConnStr: "pgsql: host=127.0.0.1 port=5432 user=fcs dbname=www-data password=***" cmdiUrl: https://arche.acdh.oeaw.ac.at/oaipmh/?verb=GetRecordRaw&metadataPrefix=cmdi&identifier=%s highlighting: minWords: 5 diff --git a/src/acdhOeaw/arche/fcs/Endpoint.php b/src/acdhOeaw/arche/fcs/Endpoint.php index 0ca4d83..5e19796 100644 --- a/src/acdhOeaw/arche/fcs/Endpoint.php +++ b/src/acdhOeaw/arche/fcs/Endpoint.php @@ -450,7 +450,7 @@ private function sanitizeParam(SruParameters $param, string $operation): void { } private function getDbHandle(): PDO { - $pdo = new PDO('pgsql: ' . $this->cfg->dbConnStr); + $pdo = new PDO($this->cfg->dbConnStr); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $pdo->beginTransaction(); return $pdo;