File: ini.xml

package info (click to toggle)
php-doc 20250827~git.abe740d%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 71,968 kB
  • sloc: xml: 985,760; php: 25,504; javascript: 671; sh: 177; makefile: 37
file content (598 lines) | stat: -rw-r--r-- 19,474 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<section xml:id="errorfunc.configuration" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 &reftitle.runtime;
 &extension.runtime;
 <para>
  <table>
   <title>Errors and Logging Configuration Options</title>
   <tgroup cols="4">
    <thead>
     <row>
      <entry>&Name;</entry>
      <entry>&Default;</entry>
      <entry>&Changeable;</entry>
      <entry>&Changelog;</entry>
     </row>
    </thead>
    <tbody>
    <row>
     <entry><link linkend="ini.error-reporting">error_reporting</link></entry>
     <entry>NULL</entry>
     <entry><constant>INI_ALL</constant></entry>
     <entry></entry>
    </row>
    <row>
     <entry><link linkend="ini.display-errors">display_errors</link></entry>
     <entry>"1"</entry>
     <entry><constant>INI_ALL</constant></entry>
     <entry></entry>
    </row>
    <row>
     <entry><link linkend="ini.display-startup-errors">display_startup_errors</link></entry>
     <entry>"1"</entry>
     <entry><constant>INI_ALL</constant></entry>
     <entry>
       Prior to PHP 8.0.0, the default value was <literal>"0"</literal>.
     </entry>
    </row>
    <row>
     <entry><link linkend="ini.log-errors">log_errors</link></entry>
     <entry>"0"</entry>
     <entry><constant>INI_ALL</constant></entry>
     <entry></entry>
    </row>
    <row>
     <entry><link linkend="ini.log-errors-max-len">log_errors_max_len</link></entry>
     <entry>"1024"</entry>
     <entry><constant>INI_ALL</constant></entry>
     <entry>Had no effect as of PHP 8.0.0, removed as of PHP 8.1.0.</entry>
    </row>
    <row>
     <entry><link linkend="ini.ignore-repeated-errors">ignore_repeated_errors</link></entry>
     <entry>"0"</entry>
     <entry><constant>INI_ALL</constant></entry>
     <entry></entry>
    </row>
    <row>
     <entry><link linkend="ini.ignore-repeated-source">ignore_repeated_source</link></entry>
     <entry>"0"</entry>
     <entry><constant>INI_ALL</constant></entry>
     <entry></entry>
    </row>
    <row>
     <entry><link linkend="ini.report-memleaks">report_memleaks</link></entry>
     <entry>"1"</entry>
     <entry><constant>INI_ALL</constant></entry>
     <entry></entry>
    </row>
    <row>
     <entry><link linkend="ini.track-errors">track_errors</link></entry>
     <entry>"0"</entry>
     <entry><constant>INI_ALL</constant></entry>
     <entry>Deprecated as of PHP 7.2.0, removed as of PHP 8.0.0.</entry>
    </row>
    <row>
     <entry><link linkend="ini.html-errors">html_errors</link></entry>
     <entry>"1"</entry>
     <entry><constant>INI_ALL</constant></entry>
     <entry></entry>
    </row>
    <row>
     <entry><link linkend="ini.xmlrpc-errors">xmlrpc_errors</link></entry>
     <entry>"0"</entry>
     <entry><constant>INI_SYSTEM</constant></entry>
     <entry></entry>
    </row>
    <row>
     <entry><link linkend="ini.xmlrpc-error-number">xmlrpc_error_number</link></entry>
     <entry>"0"</entry>
     <entry><constant>INI_ALL</constant></entry>
     <entry></entry>
    </row>
    <row>
     <entry><link linkend="ini.docref-root">docref_root</link></entry>
     <entry>""</entry>
     <entry><constant>INI_ALL</constant></entry>
     <entry></entry>
    </row>
    <row>
     <entry><link linkend="ini.docref-ext">docref_ext</link></entry>
     <entry>""</entry>
     <entry><constant>INI_ALL</constant></entry>
     <entry></entry>
    </row>
    <row>
     <entry><link linkend="ini.error-prepend-string">error_prepend_string</link></entry>
     <entry>NULL</entry>
     <entry><constant>INI_ALL</constant></entry>
     <entry></entry>
    </row>
    <row>
     <entry><link linkend="ini.error-append-string">error_append_string</link></entry>
     <entry>NULL</entry>
     <entry><constant>INI_ALL</constant></entry>
     <entry></entry>
    </row>
    <row>
     <entry><link linkend="ini.error-log">error_log</link></entry>
     <entry>NULL</entry>
     <entry><constant>INI_ALL</constant></entry>
     <entry></entry>
    </row>
    <row>
     <entry><link linkend="ini.error-log-mode">error_log_mode</link></entry>
     <entry>0o644</entry>
     <entry><constant>INI_ALL</constant></entry>
     <entry>Available as of PHP 8.2.0</entry>
    </row>
    <row>
     <entry><link linkend="ini.syslog.facility">syslog.facility</link></entry>
     <entry>"LOG_USER"</entry>
     <entry><constant>INI_SYSTEM</constant></entry>
     <entry>Available as of PHP 7.3.0.</entry>
    </row>
    <row>
     <entry><link linkend="ini.syslog.filter">syslog.filter</link></entry>
     <entry>"no-ctrl"</entry>
     <entry><constant>INI_ALL</constant></entry>
     <entry>Available as of PHP 7.3.0.</entry>
    </row>
    <row>
     <entry><link linkend="ini.syslog.ident">syslog.ident</link></entry>
     <entry>"php"</entry>
     <entry><constant>INI_SYSTEM</constant></entry>
     <entry>Available as of PHP 7.3.0.</entry>
    </row>
    </tbody>
   </tgroup>
  </table>
  &ini.php.constants;
 </para>

 &ini.descriptions.title;

 <para>
  <variablelist>
   <varlistentry xml:id="ini.error-reporting">
    <term>
     <parameter>error_reporting</parameter>
     <type>int</type>
    </term>
    <listitem>
     <para>
      Set the error reporting level. The parameter is either an integer
      representing a bit field, or named constants. The error_reporting
      levels and constants are described in
      <link linkend="errorfunc.constants">Predefined Constants</link>,
      and in &php.ini;. To set at runtime, use the
      <function>error_reporting</function> function. See also the
      <link linkend="ini.display-errors">display_errors</link> directive.
     </para>
     <para>
      The default value is <constant>E_ALL</constant>.
     </para>
     <para>
      Prior to PHP 8.0.0, the default value was:
      <userinput><constant>E_ALL</constant> &amp;
       ~<constant>E_NOTICE</constant> &amp;
       ~<constant>E_STRICT</constant> &amp;
       ~<constant>E_DEPRECATED</constant></userinput>.
      This means diagnostics of level <constant>E_NOTICE</constant>,
      <constant>E_STRICT</constant> and <constant>E_DEPRECATED</constant>
      were not shown.
     </para>
     <note>
      <title>PHP Constants outside of PHP</title>
      <para>
       Using PHP Constants outside of PHP, like in <filename>httpd.conf</filename>,
       will have no useful meaning so in such cases the <type>int</type> values 
       are required. And since error levels will be added over time, the maximum
       value (for <constant>E_ALL</constant>) will likely change. So in place of
       <constant>E_ALL</constant> consider using a larger value to cover all bit
       fields from now and well into the future, a numeric value like
       <literal>2147483647</literal> (includes all errors, not just
       <constant>E_ALL</constant>).
      </para>
     </note>
    </listitem>
   </varlistentry>

   <varlistentry xml:id="ini.display-errors">
    <term>
     <parameter>display_errors</parameter>
     <type>string</type>
    </term>
    <listitem>
     <para>
      This determines whether errors should be printed to the screen
      as part of the output or if they should be hidden from the user.
     </para>
     <para>
      Value <literal>"stderr"</literal> sends the errors to <literal>stderr</literal>
      instead of <literal>stdout</literal>.
     </para>
     <note>
      <para>
      This is a feature to support your development and should never be used 
      on production systems (e.g. systems connected to the internet).
      </para>
     </note>
     <note>
      <para>
       Although display_errors may be set at runtime (with <function>ini_set</function>),
       it won't have any effect if the script has fatal errors.
       This is because the desired runtime action does not get executed.
      </para>
     </note>
    </listitem>
   </varlistentry>

   <varlistentry xml:id="ini.display-startup-errors">
    <term>
     <parameter>display_startup_errors</parameter>
     <type>bool</type>
    </term>
    <listitem>
     <para>
      Even when display_errors is on, errors that occur during PHP's startup
      sequence are not displayed. It's strongly recommended to keep
      display_startup_errors off, except for debugging.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry xml:id="ini.log-errors">
    <term>
     <parameter>log_errors</parameter>
     <type>bool</type>
    </term>
    <listitem>
     <para>
      Tells whether script error messages should be logged to the
      server's error log or <link linkend="ini.error-log">error_log</link>.
      This option is thus server-specific.
     </para>
     <note>
      <para>
       You're strongly advised to use error logging in place of
       error displaying on production web sites.
      </para>
     </note>
    </listitem>
   </varlistentry>

   <varlistentry xml:id="ini.log-errors-max-len">
    <term>
     <parameter>log_errors_max_len</parameter>
     <type>int</type>
    </term>
    <listitem>
     <para>
      Set the maximum length of log_errors in bytes. In
      <link linkend="ini.error-log">error_log</link> information about
      the source is added. The default is 1024 and 0 allows to not apply
      any maximum length at all.
      This length is applied to logged errors, displayed errors and also to
      <varname>$php_errormsg</varname>, but not to explicitly called functions
      such as <function>error_log</function>.
     </para>

     &ini.shorthandbytes;

    </listitem>
   </varlistentry>

   <varlistentry xml:id="ini.ignore-repeated-errors">
    <term>
     <parameter>ignore_repeated_errors</parameter>
     <type>bool</type>
    </term>
    <listitem>
     <para>
      Do not log repeated messages. Repeated errors must occur in the same
      file on the same line unless
      <link linkend="ini.ignore-repeated-source">ignore_repeated_source</link>
      is set true.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry xml:id="ini.ignore-repeated-source">
    <term>
     <parameter>ignore_repeated_source</parameter>
     <type>bool</type>
    </term>
    <listitem>
     <para>
      Ignore source of message when ignoring repeated messages. When this setting
      is On you will not log errors with repeated messages from different files or
      sourcelines.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry xml:id="ini.report-memleaks">
    <term>
     <parameter>report_memleaks</parameter>
     <type>bool</type>
    </term>
    <listitem>
     <para>
      If this parameter is set to On (the default), this parameter will show a
      report of memory leaks detected by the Zend memory manager. This report
      will be sent to stderr on Posix platforms. On Windows, it will be sent
      to the debugger using OutputDebugString() and can be viewed with tools
      like <link xlink:href="&url.dbgview;">DbgView</link>.
      This parameter only has effect in a debug build and if
      error_reporting includes <constant>E_WARNING</constant> in the allowed
      list.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry xml:id="ini.track-errors">
    <term>
     <parameter>track_errors</parameter>
     <type>bool</type>
    </term>
    <listitem>
     <para>
      If enabled, the last error message will always be present in the
      variable <varname>$php_errormsg</varname>.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry xml:id="ini.html-errors">
    <term>
     <parameter>html_errors</parameter>
     <type>bool</type>
    </term>
    <listitem>
     <para>
      If enabled, error messages will include HTML tags. The format for HTML
      errors produces clickable messages that direct the user to a page
      describing the error or function in causing the error. These references
      are affected by
      <link linkend="ini.docref-root">docref_root</link> and
      <link linkend="ini.docref-ext">docref_ext</link>.
     </para>
     <para>
      If disabled, error message will be solely plain text.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry xml:id="ini.xmlrpc-errors">
    <term>
     <parameter>xmlrpc_errors</parameter>
     <type>bool</type>
    </term>
    <listitem>
     <para>
      If enabled, turns off normal error reporting and formats errors as
      XML-RPC error message.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry xml:id="ini.xmlrpc-error-number">
    <term>
     <parameter>xmlrpc_error_number</parameter>
     <type>int</type>
    </term>
    <listitem>
     <para>
      Used as the value of the XML-RPC faultCode element.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry xml:id="ini.docref-root">
    <term>
     <parameter>docref_root</parameter>
     <type>string</type>
    </term>
    <listitem>
     <para>
      The new error format contains a reference to a page describing the error or 
      function causing the error. In case of manual pages you can download the 
      manual in your language and set this ini directive to the URL of your local
      copy. If your local copy of the manual can be reached by <literal>"/manual/"</literal>
      you can simply use <userinput>docref_root=/manual/</userinput>. Additional you have 
      to set docref_ext to match the fileextensions of your copy 
      <userinput>docref_ext=.html</userinput>. It is possible to use external 
      references. For example you can use 
      <userinput>docref_root=http://manual/en/</userinput> or
      <userinput>docref_root="http://landonize.it/?how=url&amp;theme=classic&amp;filter=Landon
      &amp;url=http%3A%2F%2Fwww.php.net%2F"</userinput>
     </para>
     <para>
      Most of the time you want the docref_root value to end with a slash <literal>"/"</literal>.
      But see the second example above which does not have nor need it.
     </para>
     <note>
      <para>
       This is a feature to support your development since it makes it easy to 
       lookup a function description. However it should never be used on 
       production systems (e.g. systems connected to the internet).
      </para>
     </note>
    </listitem>
   </varlistentry>

   <varlistentry xml:id="ini.docref-ext">
    <term>
     <parameter>docref_ext</parameter>
     <type>string</type>
    </term>
    <listitem>
     <para>
      See <link linkend="ini.docref-root">docref_root</link>.
     </para>
     <note>
      <para>
       The value of docref_ext must begin with a dot <literal>"."</literal>.
      </para>
     </note>
    </listitem>
   </varlistentry>

   <varlistentry xml:id="ini.error-prepend-string">
    <term>
     <parameter>error_prepend_string</parameter>
     <type>string</type>
    </term>
    <listitem>
     <para>
      String to output before an error message.
      Only used when the error message is displayed on screen. The main purpose
      is to be able to prepend additional HTML markup to the error message.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry xml:id="ini.error-append-string">
    <term>
     <parameter>error_append_string</parameter>
     <type>string</type>
    </term>
    <listitem>
     <para>
      String to output after an error message.
      Only used when the error message is displayed on screen. The main purpose
      is to be able to append additional HTML markup to the error message.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry xml:id="ini.error-log">
    <term>
     <parameter>error_log</parameter>
     <type>string</type>
    </term>
    <listitem>
     <para>
      Name of the file where script errors should be logged. The file should
      be writable by the web server's user. If the
      special value <literal>syslog</literal> is used, the errors
      are sent to the system logger instead. On Unix, this means
      syslog(3) and on Windows it means the event log. See also:
      <function>syslog</function>.
      If this directive is not set, errors are sent to the SAPI error logger. 
      For example, it is an error log in Apache or <literal>stderr</literal>
      in CLI.
      See also <function>error_log</function>.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry xml:id="ini.error-log-mode">
    <term>
     <parameter>error_log_mode</parameter>
     <type>int</type>
    </term>
    <listitem>
     <para>
      File mode for the file described set in
      <link linkend="ini.error-log">error_log</link>.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry xml:id="ini.syslog.facility">
    <term>
     <parameter>syslog.facility</parameter>
     <type>string</type>
    </term>
    <listitem>
     <para>
      Specifies what type of program is logging the message.
      Only effective if <link linkend="ini.error-log">error_log</link> is set to "syslog".
     </para>
    </listitem>
   </varlistentry>

   <varlistentry xml:id="ini.syslog.filter">
    <term>
     <parameter>syslog.filter</parameter>
     <type>string</type>
    </term>
    <listitem>
     <para>
      Specifies the filter type to filter the logged messages. Allowed
      characters are passed unmodified; all others are written in their
      hexadecimal representation prefixed with <literal>\x</literal>. 
      <itemizedlist>
       <listitem>
        <simpara><literal>all</literal> – the logged string will be split 
         at newline characters, and all characters are passed unaltered
        </simpara>
       </listitem>
       <listitem>
        <simpara><literal>ascii</literal> – the logged string will be split 
         at newline characters, and any non-printable 7-bit ASCII characters will be escaped
        </simpara>
       </listitem>
       <listitem>
        <simpara><literal>no-ctrl</literal> – the logged string will be split 
         at newline characters, and any non-printable characters will be escaped
        </simpara>
       </listitem>
       <listitem>
        <simpara><literal>raw</literal> – all characters are passed to the system 
         logger unaltered, without splitting at newlines (identical to PHP before 7.3)
        </simpara>
       </listitem>
      </itemizedlist>
      This setting will affect logging via <link linkend="ini.error-log">error_log</link> set to "syslog" and calls to <function>syslog</function>.
     </para>
     <note>
      <para>
       The <literal>raw</literal> filter type is available as of PHP 7.3.8 and PHP 7.4.0.
      </para>
     </note>
     <simpara>
      This directive is not supported on Windows.
     </simpara>
    </listitem>
   </varlistentry>

   <varlistentry xml:id="ini.syslog.ident">
    <term>
     <parameter>syslog.ident</parameter>
     <type>string</type>
    </term>
    <listitem>
     <para>
      Specifies the ident string which is prepended to every message.
      Only effective if <link linkend="ini.error-log">error_log</link> is set to "syslog".
     </para>
    </listitem>
   </varlistentry>

  </variablelist>
 </para>
</section>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->