install/ini.xml
9ab074d32484672f93e5d822f42fb94ae9088207
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<chapter xml:id="configuration" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+
<chapter xml:id="configuration" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
4
4
<title>Runtime Configuration</title>
5
5

6
6
<sect1 xml:id="configuration.file">
...
...
@@ -88,20 +88,23 @@
88
88
PHP to attempt to read &php.ini; from the root filesystem if it exists.
89
89
</para>
90
90
</note>
91
-
<para>
92
-
Using environment variables can be used in &php.ini; as shown below.
93
-
</para>
94
-
<para>
95
-
<example>
96
-
<title>&php.ini; Environment Variables</title>
97
-
<programlisting role="ini">
91
+
<simpara>
92
+
Environment variables can be referenced within configuration values
93
+
in &php.ini; as shown below. As of PHP 8.3.0, a fallback value can
94
+
be specified that will be used when the referenced variable is not
95
+
defined.
96
+
</simpara>
97
+
<example>
98
+
<title>&php.ini; Environment Variables</title>
99
+
<programlisting role="ini">
98
100
<![CDATA[
99
101
; PHP_MEMORY_LIMIT is taken from environment
100
102
memory_limit = ${PHP_MEMORY_LIMIT}
103
+
; If PHP_MAX_EXECUTION_TIME is not defined, it will fall back to 30
104
+
max_execution_time = ${PHP_MAX_EXECUTION_TIME:-30}
101
105
]]>
102
-
</programlisting>
103
-
</example>
104
-
</para>
106
+
</programlisting>
107
+
</example>
105
108
<para>
106
109
The &php.ini; directives handled by extensions are documented
107
110
on the respective pages of the extensions themselves. A <link linkend="ini">list of
...
...
@@ -215,8 +218,8 @@ $ PHP_INI_SCAN_DIR=/usr/local/etc/php.d: php
215
218
</simpara>
216
219
<simpara>
217
220
Only INI settings with the
218
-
modes <constant>PHP_INI_PERDIR</constant> and
219
-
<constant>PHP_INI_USER</constant> will be recognized in .user.ini-style INI
221
+
modes <constant>INI_PERDIR</constant> and
222
+
<constant>INI_USER</constant> will be recognized in .user.ini-style INI
220
223
files.
221
224
</simpara>
222
225

...
...
@@ -253,49 +256,71 @@ $ PHP_INI_SCAN_DIR=/usr/local/etc/php.d: php
253
256
<para>
254
257
For example, the
255
258
<link linkend="ini.output-buffering">output_buffering</link> setting
256
-
is <literal>PHP_INI_PERDIR</literal> therefore it may not be set using
259
+
is <constant>INI_PERDIR</constant> therefore it may not be set using
257
260
<function>ini_set</function>. However, the
258
261
<link linkend="ini.display-errors">display_errors</link> directive is
259
-
<literal>PHP_INI_ALL</literal> therefore it may be set anywhere,
262
+
<constant>INI_ALL</constant> therefore it may be set anywhere,
260
263
including with <function>ini_set</function>.
261
264
</para>
262
265

263
266
<para>
264
-
<table>
265
-
<title>Definition of PHP_INI_* modes</title>
266
-
<tgroup cols="2">
267
-
<thead>
268
-
<row>
269
-
<entry>Mode</entry>
270
-
<entry>Meaning</entry>
271
-
</row>
272
-
</thead>
273
-
<tbody>
274
-
<row>
275
-
<entry><literal>PHP_INI_USER</literal></entry>
276
-
<entry>
277
-
Entry can be set in user scripts (like with <function>ini_set</function>)
278
-
or in the <link linkend="configuration.changes.windows">Windows registry</link>.
279
-
Entry can be set in &user-ini;
280
-
</entry>
281
-
</row>
282
-
<row>
283
-
<entry><literal>PHP_INI_PERDIR</literal></entry>
284
-
<entry>
285
-
Entry can be set in &php.ini;, &htaccess;, &httpd.conf; or &user-ini;
286
-
</entry>
287
-
</row>
288
-
<row>
289
-
<entry><literal>PHP_INI_SYSTEM</literal></entry>
290
-
<entry>Entry can be set in &php.ini; or &httpd.conf;</entry>
291
-
</row>
292
-
<row>
293
-
<entry><literal>PHP_INI_ALL</literal></entry>
294
-
<entry>Entry can be set anywhere</entry>
295
-
</row>
296
-
</tbody>
297
-
</tgroup>
298
-
</table>
267
+
<variablelist>
268
+
<!--
269
+
Replace everything inside the <variablelist> element with an <xi:include>
270
+
once libxml2 gets XInclude 1.1 attribute copying support.
271
+
The below <xi:include> will include the appropriate elements
272
+
but needs all top-level xml:id's removed (see XInclude 1.1 set-xml-id).
273
+

274
+
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('constant.ini-mode')/*)"><xi:fallback/></xi:include>
275
+
-->
276
+
<title>INI mode constants</title>
277
+
<varlistentry>
278
+
<term>
279
+
<constant>INI_USER</constant>
280
+
(<type>int</type>)
281
+
</term>
282
+
<listitem>
283
+
<simpara>
284
+
Entry can be set in user scripts (like with <function xmlns="http://docbook.org/ns/docbook">ini_set</function>)
285
+
or in the <link xmlns="http://docbook.org/ns/docbook" linkend="configuration.changes.windows">Windows registry</link>.
286
+
Entry can be set in &user-ini;
287
+
</simpara>
288
+
</listitem>
289
+
</varlistentry>
290
+
<varlistentry>
291
+
<term>
292
+
<constant>INI_PERDIR</constant>
293
+
(<type>int</type>)
294
+
</term>
295
+
<listitem>
296
+
<simpara>
297
+
Entry can be set in &php.ini;, &htaccess;, &httpd.conf; or &user-ini;
298
+
</simpara>
299
+
</listitem>
300
+
</varlistentry>
301
+
<varlistentry>
302
+
<term>
303
+
<constant>INI_SYSTEM</constant>
304
+
(<type>int</type>)
305
+
</term>
306
+
<listitem>
307
+
<simpara>
308
+
Entry can be set in &php.ini; or &httpd.conf;
309
+
</simpara>
310
+
</listitem>
311
+
</varlistentry>
312
+
<varlistentry>
313
+
<term>
314
+
<constant>INI_ALL</constant>
315
+
(<type>int</type>)
316
+
</term>
317
+
<listitem>
318
+
<simpara>
319
+
Entry can be set anywhere
320
+
</simpara>
321
+
</listitem>
322
+
</varlistentry>
323
+
</variablelist>
299
324
</para>
300
325
</sect1>
301
326

...
...
@@ -315,8 +340,8 @@ $ PHP_INI_SCAN_DIR=/usr/local/etc/php.d: php
315
340
There are several Apache directives that allow you
316
341
to change the PHP configuration from within the Apache configuration
317
342
files. For a listing of which directives are
318
-
<constant>PHP_INI_ALL</constant>, <constant>PHP_INI_PERDIR</constant>,
319
-
or <constant>PHP_INI_SYSTEM</constant>, have a look at the
343
+
<constant>INI_ALL</constant>, <constant>INI_PERDIR</constant>,
344
+
or <constant>INI_SYSTEM</constant>, have a look at the
320
345
<link linkend="ini.list">List of php.ini directives</link> appendix.
321
346
</para>
322
347

...
...
@@ -331,7 +356,7 @@ $ PHP_INI_SCAN_DIR=/usr/local/etc/php.d: php
331
356
<listitem>
332
357
<para>
333
358
Sets the value of the specified directive.
334
-
Can be used only with <constant>PHP_INI_ALL</constant> and <constant>PHP_INI_PERDIR</constant> type directives.
359
+
Can be used only with <constant>INI_ALL</constant> and <constant>INI_PERDIR</constant> type directives.
335
360
To clear a previously set value use <literal>none</literal> as the value.
336
361
</para>
337
362
<note>
...
...
@@ -351,8 +376,8 @@ $ PHP_INI_SCAN_DIR=/usr/local/etc/php.d: php
351
376
<listitem>
352
377
<para>
353
378
Used to set a boolean configuration directive.
354
-
Can be used only with <constant>PHP_INI_ALL</constant> and
355
-
<constant>PHP_INI_PERDIR</constant> type directives.
379
+
Can be used only with <constant>INI_ALL</constant> and
380
+
<constant>INI_PERDIR</constant> type directives.
356
381
</para>
357
382
</listitem>
358
383
</varlistentry>
...
...
@@ -435,8 +460,8 @@ $ PHP_INI_SCAN_DIR=/usr/local/etc/php.d: php
435
460
should have the name of the PHP configuration directive and the
436
461
string value. PHP constants in the values are not parsed.
437
462
However, only configuration values changeable in
438
-
<constant>PHP_INI_USER</constant> can be set
439
-
this way, <constant>PHP_INI_PERDIR</constant> values can not,
463
+
<constant>INI_USER</constant> can be set
464
+
this way, <constant>INI_PERDIR</constant> values can not,
440
465
because these configuration values are re-read for each request.
441
466
</simpara>
442
467
</sect2>
443
468