[DOC-CVS] [doc-en] master: Document environment variable expansion in configuration (#5181)

[email protected] (Iaroslav Sheptykin via GitHub)
Newsgroups php.doc.cvs
Message-ID <[email protected]>
Author: Iaroslav Sheptykin (yariksheptykin)
Committer: GitHub (web-flow)
Pusher: lacatoire
Date: 2026-08-21T11:49:36+02:00

Commit: https://github.com/php/doc-en/commit/7cd12cc82bc0a778241189596022acdda016d857
Raw diff: https://github.com/php/doc-en/commit/7cd12cc82bc0a778241189596022acdda016d857.diff

Document environment variable expansion in configuration (#5181)

* Document environment variable expansion in configuration

Added documentation on using environment variable expansion for configuration values, including examples.

* blance para

* Wrap ENV in brackets

Co-authored-by: Louis-Arnaud <[email protected]>

* Apply suggestion from @lacatoire

Co-authored-by: Louis-Arnaud <[email protected]>

---------

Co-authored-by: Louis-Arnaud <[email protected]>

Changed paths:
  M  install/fpm/configuration.xml


Diff:

diff --git a/install/fpm/configuration.xml b/install/fpm/configuration.xml
index 0718302f3c76..e33c099864ce 100644
--- a/install/fpm/configuration.xml
+++ b/install/fpm/configuration.xml
@@ -1003,6 +1003,21 @@
       </listitem>
      </varlistentry>
     </variablelist>
+    <para>
+     Configuration values can be set using environment variable expansion.
+     Setting default values when the environment variable is unset or null is also supported as of PHP 8.3.0.
+     For example:
+        <example>
+        <title>Using environment variable expansion</title>
+        <programlisting role="ini">
+<![CDATA[
+listen = /var/run/php-fpm-${POOL_NAME}.sock
+user = ${USER_NAME:-www-data}
+group = ${USER_NAME:-www-data}
+]]>
+        </programlisting>
+       </example>
+    </para>
     <para>
      It's possible to pass additional environment variables and update PHP settings of a certain pool.
      To do this, you need to add the following options to the pool configuration file.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.