Skip to content

Commit

Permalink
Use environment variables passed via FastCGI (#1113)
Browse files Browse the repository at this point in the history
Allow passing environment variables from Apache to PHP-FPM to be used as Elastic APM PHP agent configuration
  • Loading branch information
SergeyKleyman authored Jan 4, 2024
1 parent 9609745 commit 54e2974
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ public function currentSnapshot(array $optionNameToMeta): RawSnapshotInterface
$optionNameToEnvVarValue = [];

foreach ($optionNameToMeta as $optionName => $optionMeta) {
$envVarValue = getenv(
self::optionNameToEnvVarName($this->envVarNamesPrefix, $optionName),
/* local_only: */ true
);
$envVarValue = getenv(self::optionNameToEnvVarName($this->envVarNamesPrefix, $optionName));
if ($envVarValue !== false) {
$optionNameToEnvVarValue[$optionName] = $envVarValue;
}
Expand Down

0 comments on commit 54e2974

Please sign in to comment.