mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
1796 lines
58 KiB
XML
1796 lines
58 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
|
|
<section xml:id="ini.core" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<title>Description of core &php.ini; directives</title>
|
|
<para>
|
|
This list includes the core &php.ini; directives you can set to
|
|
configure your PHP setup. Directives handled by extensions are listed
|
|
and detailed at the extension documentation pages respectively;
|
|
Information on the session directives for example can be found at the
|
|
<link linkend="session.configuration">sessions page</link>.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
The defaults listed here are used when &php.ini; is not loaded; the values for the production and development &php.ini; may vary.
|
|
</para>
|
|
</note>
|
|
<section xml:id="ini.sect.language-options">
|
|
<title>Language Options</title>
|
|
<para>
|
|
<table>
|
|
<title>Language and Misc 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.short-open-tag">short_open_tag</link></entry>
|
|
<entry>"1"</entry>
|
|
<entry>PHP_INI_PERDIR</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.precision">precision</link></entry>
|
|
<entry>"14"</entry>
|
|
<entry>PHP_INI_ALL</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.serialize-precision">serialize_precision</link></entry>
|
|
<entry>"-1"</entry>
|
|
<entry>PHP_INI_ALL</entry>
|
|
<entry>
|
|
Prior to PHP 7.1.0, the default value was 17.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.disable-functions">disable_functions</link></entry>
|
|
<entry>""</entry>
|
|
<entry>PHP_INI_SYSTEM only</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.disable-classes">disable_classes</link></entry>
|
|
<entry>""</entry>
|
|
<entry>&php.ini; only</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.exit-on-timeout">exit_on_timeout</link></entry>
|
|
<entry>""</entry>
|
|
<entry>PHP_INI_ALL</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.expose-php">expose_php</link></entry>
|
|
<entry>"1"</entry>
|
|
<entry>&php.ini; only</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.hard-timeout">hard_timeout</link></entry>
|
|
<entry>"2"</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry>Available as of PHP 7.1.0.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.zend.exception-ignore-args">zend.exception_ignore_args</link></entry>
|
|
<entry>"0"</entry>
|
|
<entry>PHP_INI_ALL</entry>
|
|
<entry>Available as of PHP 7.4.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.zend.multibyte">zend.multibyte</link></entry>
|
|
<entry>"0"</entry>
|
|
<entry>PHP_INI_ALL</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.zend.script-encoding">zend.script_encoding</link></entry>
|
|
<entry>NULL</entry>
|
|
<entry>PHP_INI_ALL</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.zend.detect-unicode">zend.detect_unicode</link></entry>
|
|
<entry>NULL</entry>
|
|
<entry>PHP_INI_ALL</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.zend.signal-check">zend.signal_check</link></entry>
|
|
<entry>"0"</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.zend.assertions">zend.assertions</link></entry>
|
|
<entry>"1"</entry>
|
|
<entry>PHP_INI_ALL with restrictions</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.zend.exception-string-param-max-len">zend.exception_string_param_max_len</link></entry>
|
|
<entry>"15"</entry>
|
|
<entry>PHP_INI_ALL</entry>
|
|
<entry>Available as of PHP 8.0.0.</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
|
|
&ini.descriptions.title;
|
|
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry xml:id="ini.short-open-tag">
|
|
<term>
|
|
<parameter>short_open_tag</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Tells PHP whether the short form (<userinput><? ?></userinput>)
|
|
of PHP's open tag should be allowed. If you want to use PHP in
|
|
combination with XML, you can disable this option in order to
|
|
use <userinput><?xml ?></userinput> inline. Otherwise, you
|
|
can print it with PHP, for example: <userinput><?php echo '<?xml
|
|
version="1.0"?>'; ?></userinput>. Also, if disabled, you must use the
|
|
long form of the PHP open tag (<userinput><?php ?></userinput>).
|
|
</para>
|
|
<note>
|
|
<para>
|
|
This directive does not affect the shorthand
|
|
<userinput><?=</userinput>, which is always available.
|
|
</para>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.precision">
|
|
<term>
|
|
<parameter>precision</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
The number of significant digits displayed in floating point numbers.
|
|
<literal>-1</literal> means that an enhanced algorithm for rounding
|
|
such numbers will be used.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.serialize-precision">
|
|
<term>
|
|
<parameter>serialize_precision</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
The number of significant digits stored while serializing floating point numbers.
|
|
<literal>-1</literal> means that an enhanced algorithm for rounding
|
|
such numbers will be used.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.expose-php">
|
|
<term>
|
|
<parameter>expose_php</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Exposes to the world that PHP is installed on the server, which includes the
|
|
PHP version within the HTTP header (e.g., X-Powered-By: PHP/5.3.7).
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.disable-functions">
|
|
<term>
|
|
<parameter>disable_functions</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
This directive allows you to disable certain functions. It takes
|
|
on a comma-delimited list of function names.
|
|
</para>
|
|
<para>
|
|
Only <link linkend="functions.internal">internal functions</link> can
|
|
be disabled using this directive. <link linkend="functions.user-defined">User-defined functions</link>
|
|
are unaffected.
|
|
</para>
|
|
<para>
|
|
This directive must be set in &php.ini; For example, you
|
|
cannot set this in &httpd.conf;.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.disable-classes">
|
|
<term>
|
|
<parameter>disable_classes</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
This directive allows you to disable certain classes. It takes
|
|
on a comma-delimited list of class names.
|
|
</simpara>
|
|
<simpara>
|
|
This directive must be set in &php.ini; For example, you
|
|
cannot set this in &httpd.conf;.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.zend.assertions">
|
|
<term>
|
|
<parameter>zend.assertions</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
When set to <literal>1</literal>, assertion code will be generated and
|
|
executed (development mode). When set to <literal>0</literal>,
|
|
assertion code will be generated but it will be skipped (not executed)
|
|
at runtime. When set to <literal>-1</literal>, assertion code will not
|
|
be generated, making the assertions zero-cost (production mode).
|
|
</simpara>
|
|
<note>
|
|
<para>
|
|
If a process is started in production mode, <link linkend="ini.zend.assertions">zend.assertions</link>
|
|
cannot be changed at runtime, since the code for assertions was not generated.
|
|
</para>
|
|
<para>
|
|
If a process is started in development mode, <link linkend="ini.zend.assertions">zend.assertions</link>
|
|
cannot be set to <literal>-1</literal> at runtime.
|
|
</para>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.zend.exception-string-param-max-len">
|
|
<term>
|
|
<parameter>zend.exception_string_param_max_len</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
The maximum length of string function arguments in stringified stack traces.
|
|
Must range between <literal>"0"</literal> and <literal>"1000000"</literal>.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.hard-timeout">
|
|
<term>
|
|
<parameter>hard_timeout</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
When the timeout set in <link linkend="ini.max-execution-time">max_execution_time</link>
|
|
has been hit, the PHP runtime will tear down resources gracefully. If
|
|
something gets stuck while this happens, the hard timeout will tick
|
|
for the set amount of seconds. When the hard timeout is hit, PHP will
|
|
exit ungracefully. When set to 0, the hard timeout will never activate.
|
|
</para>
|
|
<para>
|
|
When PHP stops from a hard timeout, it will look something like this:
|
|
<screen>
|
|
<![CDATA[
|
|
Fatal error: Maximum execution time of 30+2 seconds exceeded (terminated) in Unknown on line 0
|
|
]]>
|
|
</screen>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.zend.exception-ignore-args">
|
|
<term>
|
|
<parameter>zend.exception_ignore_args</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Excludes arguments from stack traces generated from exceptions.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.zend.multibyte">
|
|
<term>
|
|
<parameter>zend.multibyte</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Enables parsing of source files in multibyte encodings. Enabling zend.multibyte
|
|
is required to use character encodings like SJIS, BIG5, etc that contain special
|
|
characters in multibyte string data. ISO-8859-1 compatible encodings like UTF-8,
|
|
EUC, etc do not require this option.
|
|
</para>
|
|
<para>
|
|
Enabling zend.multibyte requires the mbstring extension to be available.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.zend.script-encoding">
|
|
<term>
|
|
<parameter>zend.script_encoding</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
This value will be used unless a
|
|
<link linkend="control-structures.declare.encoding">declare(encoding=...)</link>
|
|
directive appears at the top of the script. When ISO-8859-1 incompatible encoding
|
|
is used, both zend.multibyte and zend.script_encoding must be used.
|
|
</para>
|
|
<para>
|
|
Literal strings will be transliterated from zend.script_encoding to
|
|
mbstring.internal_encoding, as if
|
|
<function>mb_convert_encoding</function> would have been called.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.zend.detect-unicode">
|
|
<term>
|
|
<parameter>zend.detect_unicode</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Check for BOM (Byte Order Mark) and see if the file contains valid
|
|
multibyte characters.
|
|
This detection is performed before processing of
|
|
<function>__halt_compiler</function>.
|
|
Available only in Zend Multibyte mode.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.zend.signal-check">
|
|
<term>
|
|
<parameter>zend.signal_check</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
To check for replaced signal handlers on shutdown.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.exit-on-timeout">
|
|
<term>
|
|
<parameter>exit_on_timeout</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
This is an Apache1 mod_php-only directive that forces an Apache child to exit if a PHP execution timeout occurred.
|
|
Such a timeout causes an internal longjmp() call in Apache1 which can leave some extensions in an inconsistent
|
|
state. By terminating the process any outstanding locks or memory will be cleaned up.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
</para>
|
|
</section>
|
|
|
|
<section xml:id="ini.sect.resource-limits">
|
|
<title>Resource Limits</title>
|
|
<para>
|
|
<table>
|
|
<title>Resource Limits</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.memory-limit">memory_limit</link></entry>
|
|
<entry>"128M"</entry>
|
|
<entry>PHP_INI_ALL</entry>
|
|
<entry></entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
|
|
&ini.descriptions.title;
|
|
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry xml:id="ini.memory-limit">
|
|
<term>
|
|
<parameter>memory_limit</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
This sets the maximum amount of memory in bytes that a script
|
|
is allowed to allocate. This helps prevent poorly written
|
|
scripts for eating up all available memory on a server. Note that
|
|
to have no memory limit, set this directive to <literal>-1</literal>.
|
|
</para>
|
|
|
|
&ini.shorthandbytes;
|
|
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
<para>
|
|
See also: <link linkend="ini.max-execution-time">max_execution_time</link>.
|
|
</para>
|
|
</section>
|
|
|
|
<section xml:id="ini.sect.performance">
|
|
<title>Performance Tuning</title>
|
|
<para>
|
|
<table>
|
|
<title>Performance Tuning</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.realpath-cache-size">realpath_cache_size</link></entry>
|
|
<entry>"4M"</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry>Prior to PHP 7.0.16 and 7.1.2, the default was <literal>"16K"</literal></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.realpath-cache-ttl">realpath_cache_ttl</link></entry>
|
|
<entry>"120"</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry></entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
<note>
|
|
<para>
|
|
Using <link linkend="ini.open-basedir">open_basedir</link> will
|
|
<emphasis>disable</emphasis> the realpath cache.
|
|
</para>
|
|
</note>
|
|
</para>
|
|
&ini.descriptions.title;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry xml:id="ini.realpath-cache-size">
|
|
<term>
|
|
<parameter>realpath_cache_size</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Determines the size of the realpath cache to be used by PHP. This
|
|
value should be increased on systems where PHP opens many files, to
|
|
reflect the quantity of the file operations performed.
|
|
</para>
|
|
<para>
|
|
The size represents the total number of bytes in the path strings
|
|
stored, plus the size of the data associated with the cache entry. This
|
|
means that in order to store longer paths in the cache, the cache size
|
|
must be larger. This value does not directly control the number of
|
|
distinct paths that can be cached.
|
|
</para>
|
|
<para>
|
|
The size required for the cache entry data is system dependent.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.realpath-cache-ttl">
|
|
<term>
|
|
<parameter>realpath_cache_ttl</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Duration of time (in seconds) for which to cache realpath information
|
|
for a given file or directory. For systems with rarely changing files,
|
|
consider increasing the value.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</section>
|
|
|
|
<section xml:id="ini.sect.data-handling">
|
|
<title>Data Handling</title>
|
|
<para>
|
|
<table>
|
|
<title>Data Handling 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.arg-separator.output">arg_separator.output</link></entry>
|
|
<entry>"&"</entry>
|
|
<entry>PHP_INI_ALL</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.arg-separator.input">arg_separator.input</link></entry>
|
|
<entry>"&"</entry>
|
|
<entry>PHP_INI_PERDIR</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.variables-order">variables_order</link></entry>
|
|
<entry>"EGPCS"</entry>
|
|
<entry>PHP_INI_PERDIR</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.request-order">request_order</link></entry>
|
|
<entry>""</entry>
|
|
<entry>PHP_INI_PERDIR</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.auto-globals-jit">auto_globals_jit</link></entry>
|
|
<entry>"1"</entry>
|
|
<entry>PHP_INI_PERDIR</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.register-argc-argv">register_argc_argv</link></entry>
|
|
<entry>"1"</entry>
|
|
<entry>PHP_INI_PERDIR</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.enable-post-data-reading">enable_post_data_reading</link></entry>
|
|
<entry>"1"</entry>
|
|
<entry>PHP_INI_PERDIR</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.post-max-size">post_max_size</link></entry>
|
|
<entry>"8M"</entry>
|
|
<entry>PHP_INI_PERDIR</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.auto-prepend-file">auto_prepend_file</link></entry>
|
|
<entry>NULL</entry>
|
|
<entry>PHP_INI_PERDIR</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.auto-append-file">auto_append_file</link></entry>
|
|
<entry>NULL</entry>
|
|
<entry>PHP_INI_PERDIR</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.default-mimetype">default_mimetype</link></entry>
|
|
<entry>"text/html"</entry>
|
|
<entry>PHP_INI_ALL</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.default-charset">default_charset</link></entry>
|
|
<entry>"UTF-8"</entry>
|
|
<entry>PHP_INI_ALL</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.input-encoding">input_encoding</link></entry>
|
|
<entry>""</entry>
|
|
<entry>PHP_INI_ALL</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.output-encoding">output_encoding</link></entry>
|
|
<entry>""</entry>
|
|
<entry>PHP_INI_ALL</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.internal-encoding">internal_encoding</link></entry>
|
|
<entry>""</entry>
|
|
<entry>PHP_INI_ALL</entry>
|
|
<entry></entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
|
|
&ini.descriptions.title;
|
|
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry xml:id="ini.arg-separator.output">
|
|
<term>
|
|
<parameter>arg_separator.output</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
The separator used in PHP generated URLs to separate arguments.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.arg-separator.input">
|
|
<term>
|
|
<parameter>arg_separator.input</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
List of separator(s) used by PHP to parse input URLs into variables.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
Every character in this directive is considered as separator!
|
|
</para>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.variables-order">
|
|
<term>
|
|
<parameter>variables_order</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Sets the order of the EGPCS (<literal>E</literal>nvironment,
|
|
<literal>G</literal>et, <literal>P</literal>ost,
|
|
<literal>C</literal>ookie, and <literal>S</literal>erver) variable
|
|
parsing. For example, if variables_order
|
|
is set to <literal>"SP"</literal> then PHP will create the
|
|
&link.superglobals; <varname>$_SERVER</varname> and
|
|
<varname>$_POST</varname>, but not create
|
|
<varname>$_ENV</varname>, <varname>$_GET</varname>, and
|
|
<varname>$_COOKIE</varname>. Setting to "" means no
|
|
&link.superglobals; will be set.
|
|
</para>
|
|
<warning>
|
|
<para>
|
|
In both the CGI and FastCGI SAPIs,
|
|
<varname>$_SERVER</varname> is
|
|
also populated by values from the environment; <literal>S</literal>
|
|
is always equivalent to <literal>ES</literal> regardless of the
|
|
placement of <literal>E</literal> elsewhere in this directive.
|
|
</para>
|
|
</warning>
|
|
<note>
|
|
<para>
|
|
The content and order of
|
|
<varname>$_REQUEST</varname> is also
|
|
affected by this directive.
|
|
</para>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.request-order">
|
|
<term>
|
|
<parameter>request_order</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
This directive describes the order in which PHP registers GET, POST
|
|
and Cookie variables into the _REQUEST array. Registration is done
|
|
from left to right, newer values override older values.
|
|
</para>
|
|
<para>
|
|
If this directive is not set, <link
|
|
linkend="ini.variables-order">variables_order</link> is used for
|
|
<varname>$_REQUEST</varname> contents.
|
|
</para>
|
|
<para>
|
|
Note that the default distribution <filename>php.ini</filename> files does not contain
|
|
the <literal>'C'</literal> for cookies, due to security concerns.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.auto-globals-jit">
|
|
<term>
|
|
<parameter>auto_globals_jit</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
When enabled, the SERVER, REQUEST, and ENV variables are created when they're
|
|
first used (Just In Time) instead of when the script starts. If these
|
|
variables are not used within a script, having this directive on will
|
|
result in a performance gain.
|
|
</para>
|
|
<warning>
|
|
<para>
|
|
Usage of SERVER, REQUEST, and ENV variables is checked during the compile time
|
|
so using them through e.g. <link
|
|
linkend="language.variables.variable">variable variables</link> will
|
|
not cause their initialization.
|
|
</para>
|
|
</warning>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.register-argc-argv">
|
|
<term>
|
|
<parameter>register_argc_argv</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Tells PHP whether to declare the argv & argc variables
|
|
(that would contain the GET information).
|
|
</simpara>
|
|
<simpara>
|
|
See also <link linkend="features.commandline">command line</link>.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.enable-post-data-reading">
|
|
<term>
|
|
<parameter>enable_post_data_reading</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Disabling this option causes <varname>$_POST</varname> and
|
|
<varname>$_FILES</varname> <emphasis>not</emphasis> to be populated.
|
|
The only way to read postdata will then be through the
|
|
<link linkend="wrappers.php">php://input</link> stream wrapper.
|
|
This can be useful to proxy requests or to process
|
|
the POST data in a memory efficient fashion.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.post-max-size">
|
|
<term>
|
|
<parameter>post_max_size</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Sets max size of post data allowed. This setting also affects
|
|
file upload. To upload large files, this value must be larger
|
|
than <link linkend="ini.upload-max-filesize">upload_max_filesize</link>.
|
|
</simpara>
|
|
<simpara>
|
|
Generally speaking,
|
|
<link linkend="ini.memory-limit">memory_limit</link> should be
|
|
larger than <parameter>post_max_size</parameter>.
|
|
</simpara>
|
|
|
|
&ini.shorthandbytes;
|
|
|
|
<simpara>
|
|
If the size of post data is greater than post_max_size, the
|
|
<varname>$_POST</varname> and <varname>$_FILES</varname>
|
|
<link linkend="language.variables.superglobals">superglobals</link>
|
|
are empty. This can be tracked in various ways, e.g. by passing the
|
|
<varname>$_GET</varname> variable to the script processing the data,
|
|
i.e. <literal><form action="edit.php?processed=1"></literal>,
|
|
and then checking if <varname>$_GET['processed']</varname> is set.
|
|
</simpara>
|
|
<para>
|
|
<note>
|
|
<para>
|
|
PHP allows shortcuts for byte values, including K (kilo), M (mega)
|
|
and G (giga). PHP will do the conversions automatically if you
|
|
use any of these. Be careful not to exceed the 32 bit signed integer
|
|
limit (if you're using 32bit versions) as it will cause your script
|
|
to fail.
|
|
</para>
|
|
</note>
|
|
</para>
|
|
<para>
|
|
<table>
|
|
<title>Changelog for <literal>post_max_size</literal></title>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>5.3.4</entry>
|
|
<entry>
|
|
<parameter>post_max_size</parameter> = 0 will not disable the limit when the content
|
|
type is application/x-www-form-urlencoded or is not registered with PHP.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>5.3.2 , 5.2.12</entry>
|
|
<entry>
|
|
Allow unlimited post size by setting <parameter>post_max_size</parameter> to 0.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.auto-prepend-file">
|
|
<term>
|
|
<parameter>auto_prepend_file</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Specifies the name of a file that is automatically parsed
|
|
before the main file. The file is included as if it was
|
|
called with the <function>require</function> function, so
|
|
<link linkend="ini.include-path">include_path</link> is used.</para>
|
|
<para>
|
|
The special value <literal>none</literal>
|
|
disables auto-prepending.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.auto-append-file">
|
|
<term>
|
|
<parameter>auto_append_file</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Specifies the name of a file that is automatically parsed
|
|
after the main file. The file is included as if it was
|
|
called with the <function>require</function> function, so
|
|
<link linkend="ini.include-path">include_path</link> is used.</para>
|
|
<para>
|
|
The special value <literal>none</literal>
|
|
disables auto-appending.
|
|
<note>
|
|
<simpara>
|
|
If the script is terminated with <function>exit</function>,
|
|
auto-append will <emphasis>not</emphasis> occur.</simpara>
|
|
</note>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.default-mimetype">
|
|
<term>
|
|
<parameter>default_mimetype</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
By default, PHP will output a media type using the Content-Type header.
|
|
To disable this, simply set it to be empty.
|
|
</para>
|
|
<para>
|
|
PHP's built-in default media type is set to text/html.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.default-charset">
|
|
<term>
|
|
<parameter>default_charset</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
"UTF-8" is the default value and its value is used
|
|
as the default character encoding for
|
|
<function>htmlentities</function>,
|
|
<function>html_entity_decode</function> and
|
|
<function>htmlspecialchars</function> if the
|
|
<parameter>encoding</parameter> parameter is omitted. The value of
|
|
<parameter>default_charset</parameter> will also be used to set the
|
|
default character set for <link linkend="book.iconv">iconv</link>
|
|
functions if the
|
|
<link linkend="ini.iconv.input-encoding"><parameter>iconv.input_encoding</parameter></link>,
|
|
<link linkend="ini.iconv.output-encoding"><parameter>iconv.output_encoding</parameter></link> and
|
|
<link linkend="ini.iconv.internal-encoding"><parameter>iconv.internal_encoding</parameter></link>
|
|
configuration options are unset, and for
|
|
<link linkend="book.mbstring">mbstring</link> functions if the
|
|
<link linkend="ini.mbstring.http-input"><parameter>mbstring.http_input</parameter></link>
|
|
<link linkend="ini.mbstring.http-output"><parameter>mbstring.http_output</parameter></link>
|
|
<link linkend="ini.mbstring.internal-encoding"><parameter>mbstring.internal_encoding</parameter></link>
|
|
configuration option is unset.
|
|
</para>
|
|
<para>
|
|
All versions of PHP will use this value as the charset within the
|
|
default Content-Type header sent by PHP if the header isn't overridden
|
|
by a call to <function>header</function>.
|
|
</para>
|
|
<para>
|
|
Setting <parameter>default_charset</parameter> to an empty value is
|
|
not recommended.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.input-encoding">
|
|
<term>
|
|
<parameter>input_encoding</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
This setting is used for multibyte modules
|
|
such as mbstring and iconv. Default is empty.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.output-encoding">
|
|
<term>
|
|
<parameter>output_encoding</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
This setting is used for multibyte modules
|
|
such as mbstring and iconv. Default is empty.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.internal-encoding">
|
|
<term>
|
|
<parameter>internal_encoding</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
This setting is used for multibyte modules
|
|
such as mbstring and iconv. Default is empty. If empty,
|
|
<link linkend="ini.default-charset">default_charset</link> is used.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
</para>
|
|
</section>
|
|
|
|
<section xml:id="ini.sect.path-directory">
|
|
<title>Paths and Directories</title>
|
|
<para>
|
|
<table>
|
|
<title>Paths and Directories 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.include-path">include_path</link></entry>
|
|
<entry>".;/path/to/php/pear"</entry>
|
|
<entry>PHP_INI_ALL</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.open-basedir">open_basedir</link></entry>
|
|
<entry>NULL</entry>
|
|
<entry>PHP_INI_ALL</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.doc-root">doc_root</link></entry>
|
|
<entry>NULL</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.user-dir">user_dir</link></entry>
|
|
<entry>NULL</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.user-ini.cache-ttl">user_ini.cache_ttl</link></entry>
|
|
<entry>"300"</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.user-ini.filename">user_ini.filename</link></entry>
|
|
<entry>".user.ini"</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.extension-dir">extension_dir</link></entry>
|
|
<entry>"/path/to/php"</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.extension">extension</link></entry>
|
|
<entry>NULL</entry>
|
|
<entry>&php.ini; only</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.zend-extension">zend_extension</link></entry>
|
|
<entry>NULL</entry>
|
|
<entry>&php.ini; only</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.cgi.check-shebang-line">cgi.check_shebang_line</link></entry>
|
|
<entry>"1"</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.cgi.discard-path">cgi.discard_path</link></entry>
|
|
<entry>"0"</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.cgi.fix-pathinfo">cgi.fix_pathinfo</link></entry>
|
|
<entry>"1"</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.cgi.force-redirect">cgi.force_redirect</link></entry>
|
|
<entry>"1"</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.cgi.nph">cgi.nph</link></entry>
|
|
<entry>"0"</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.cgi.redirect-status-env">cgi.redirect_status_env</link></entry>
|
|
<entry>NULL</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.cgi.rfc2616-headers">cgi.rfc2616_headers</link></entry>
|
|
<entry>"0"</entry>
|
|
<entry>PHP_INI_ALL</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.fastcgi.impersonate">fastcgi.impersonate</link></entry>
|
|
<entry>"0"</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.fastcgi.logging">fastcgi.logging</link></entry>
|
|
<entry>"1"</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry></entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
|
|
&ini.descriptions.title;
|
|
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry xml:id="ini.include-path">
|
|
<term>
|
|
<parameter>include_path</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Specifies a list of directories where the
|
|
<function>require</function>, <function>include</function>,
|
|
<function>fopen</function>, <function>file</function>,
|
|
<function>readfile</function> and <function>file_get_contents</function>
|
|
functions look for files. The format is like the system's
|
|
<envar>PATH</envar> environment variable: a list of directories
|
|
separated with a colon in Unix or semicolon in Windows.
|
|
</para>
|
|
<para>
|
|
PHP considers each entry in the include path separately when looking for
|
|
files to include. It will check the first path, and if it doesn't find
|
|
it, check the next path, until it either locates the included file or
|
|
returns with an
|
|
<constant>E_WARNING</constant>
|
|
or an <constant>E_ERROR</constant>.
|
|
You may modify or set your include path at runtime using
|
|
<function>set_include_path</function>.
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Unix include_path</title>
|
|
<programlisting role="php.ini">
|
|
<![CDATA[
|
|
include_path=".:/php/includes"
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Windows include_path</title>
|
|
<programlisting role="php.ini">
|
|
<![CDATA[
|
|
include_path=".;c:\php\includes"
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
Using a <literal>.</literal> in the include path allows for
|
|
relative includes as it means the current directory. However,
|
|
it is more efficient to explicitly use <literal>include
|
|
'./file'</literal> than having PHP always check the current
|
|
directory for every include.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
<literal>ENV</literal> variables are also accessible in .ini files.
|
|
As such it is possible to reference the home directory using
|
|
<literal>${LOGIN}</literal> and <literal>${USER}</literal>.
|
|
</para>
|
|
<para>
|
|
Environment variables may vary between Server APIs as those environments
|
|
may be different.
|
|
</para>
|
|
</note>
|
|
<para>
|
|
<example>
|
|
<title>Unix include_path using ${USER} env variable</title>
|
|
<programlisting role="php.ini">
|
|
<![CDATA[
|
|
include_path = ".:${USER}/pear/php"
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.open-basedir">
|
|
<term>
|
|
<parameter>open_basedir</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Limit the files that can be accessed by PHP to the specified
|
|
directory-tree, including the file itself. This directive
|
|
is <emphasis>NOT</emphasis> affected by whether Safe Mode is
|
|
turned On or Off.
|
|
</para>
|
|
<para>
|
|
When a script tries to access the filesystem, for example using
|
|
<function>include</function>, or <function>fopen</function>, the location of the file
|
|
is checked.
|
|
When the file is outside the specified directory-tree, PHP will refuse to access it.
|
|
All symbolic links are resolved, so it's not possible to avoid this restriction
|
|
with a symlink. If the file doesn't exist then the symlink couldn't be
|
|
resolved and the filename is compared to (a resolved) <option>open_basedir</option>.
|
|
</para>
|
|
<para>
|
|
<option>open_basedir</option> can affect more than just filesystem functions; for example
|
|
if <literal>MySQL</literal> is configured to use <literal>mysqlnd</literal> drivers,
|
|
<literal>LOAD DATA INFILE</literal> will be affected by <option>open_basedir</option>.
|
|
Much of the extended functionality of PHP uses <literal>open_basedir</literal> in this way.
|
|
</para>
|
|
<para>
|
|
The special value <systemitem class="filesystem">.</systemitem>
|
|
indicates that the working directory of the script will be used as the
|
|
base-directory. This is, however, a little dangerous as the working directory
|
|
of the script can easily be changed with <function>chdir</function>.
|
|
</para>
|
|
<para>
|
|
In <filename>httpd.conf</filename>, <option>open_basedir</option> can be turned off
|
|
(e.g. for some virtual hosts)
|
|
<link linkend="configuration.changes.apache">the same way</link> as
|
|
any other configuration directive with "<literal>php_admin_value open_basedir
|
|
none</literal>".
|
|
</para>
|
|
<para>
|
|
Under Windows, separate the directories with a semicolon. On all
|
|
other systems, separate the directories with a colon. As an Apache
|
|
module, <option>open_basedir</option> paths from parent directories are now
|
|
automatically inherited.
|
|
</para>
|
|
<para>
|
|
The restriction specified with <option>open_basedir</option> is a
|
|
directory name, not a prefix.
|
|
</para>
|
|
<para>
|
|
The default is to allow all files to be opened.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
open_basedir can be tightened at run-time. This means
|
|
that if open_basedir is set to <literal>/www/</literal> in &php.ini;
|
|
a script can tighten the configuration to
|
|
<literal>/www/tmp/</literal> at run-time with
|
|
<function>ini_set</function>. When listing several directories, you
|
|
can use the <constant>PATH_SEPARATOR</constant> constant as a separator
|
|
regardless of the operating system.
|
|
</para>
|
|
</note>
|
|
<note>
|
|
<para>
|
|
Using open_basedir will set <link linkend="ini.realpath-cache-size">realpath_cache_size</link>
|
|
to <literal>0</literal> and thus <emphasis>disable</emphasis> the realpath cache.
|
|
</para>
|
|
</note>
|
|
<caution>
|
|
<para>
|
|
<literal>open_basedir</literal> is just an extra safety net, that is in no way
|
|
comprehensive, and can therefore not be relied upon when security is needed.
|
|
</para>
|
|
</caution>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.doc-root">
|
|
<term>
|
|
<parameter>doc_root</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
PHP's "root directory" on the server. Only used if
|
|
non-empty.
|
|
If PHP was not compiled with FORCE_REDIRECT, you <emphasis>should
|
|
</emphasis> set doc_root if you are running PHP as a CGI under any web
|
|
server (other than IIS). The alternative is to use the
|
|
<link linkend="ini.cgi.force-redirect">
|
|
cgi.force_redirect</link> configuration below.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.user-ini.cache-ttl">
|
|
<term>
|
|
<parameter>user_ini.cache_ttl</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.user-ini.filename">
|
|
<term>
|
|
<parameter>user_ini.filename</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.user-dir">
|
|
<term>
|
|
<parameter>user_dir</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
The base name of the directory used on a user's home directory for PHP
|
|
files, for example <filename class="directory">public_html
|
|
</filename>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.extension-dir">
|
|
<term>
|
|
<parameter>extension_dir</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
In what directory PHP should look for dynamically loadable
|
|
extensions. It is recommended to specify an absolute path. See also: <link linkend="ini.enable-dl">enable_dl</link>,
|
|
and <function>dl</function>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.extension">
|
|
<term>
|
|
<parameter>extension</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Which dynamically loadable extensions to load when PHP starts up.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.zend-extension">
|
|
<term>
|
|
<parameter>zend_extension</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Name of dynamically loadable Zend extension (for example
|
|
XDebug) to load when PHP starts up.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.cgi.check-shebang-line">
|
|
<term>
|
|
<parameter>cgi.check_shebang_line</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Controls whether <acronym>CGI</acronym> PHP checks for line starting
|
|
with <literal>#!</literal> (shebang) at the top of the running script.
|
|
This line might be needed if the script support running both as
|
|
stand-alone script and via PHP <acronym>CGI</acronym>. PHP in
|
|
<acronym>CGI</acronym> mode skips this line and ignores its content if
|
|
this directive is turned on.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.cgi.discard-path">
|
|
<term>
|
|
<parameter>cgi.discard_path</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
If this is enabled, the PHP CGI binary can safely be placed outside of
|
|
the web tree and people will not be able to circumvent .htaccess security.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.cgi.fix-pathinfo">
|
|
<term>
|
|
<parameter>cgi.fix_pathinfo</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Provides <emphasis>real</emphasis> <literal>PATH_INFO</literal>/
|
|
<literal>PATH_TRANSLATED</literal> support for <acronym>CGI</acronym>.
|
|
PHP's previous behaviour was to set <literal>PATH_TRANSLATED</literal>
|
|
to <literal>SCRIPT_FILENAME</literal>, and to not grok what <literal>
|
|
PATH_INFO</literal> is. For more information on
|
|
<literal>PATH_INFO</literal>, see the <acronym>CGI</acronym> specs.
|
|
Setting this to <literal>1</literal> will cause PHP
|
|
<acronym>CGI</acronym> to fix its paths to conform to the spec. A
|
|
setting of zero causes PHP to behave as before. It is turned on by
|
|
default. You should fix your scripts to use
|
|
<literal>SCRIPT_FILENAME</literal> rather than
|
|
<literal>PATH_TRANSLATED</literal>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.cgi.force-redirect">
|
|
<term>
|
|
<parameter>cgi.force_redirect</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
cgi.force_redirect is necessary to provide security running PHP as a
|
|
<acronym>CGI</acronym> under most web servers. Left undefined, PHP
|
|
turns this on by default. You can turn it off <emphasis>at your own
|
|
risk</emphasis>.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
Windows Users: When using IIS this option <emphasis>must</emphasis>
|
|
be turned off. For OmniHTTPD or Xitami the same applies.
|
|
</para>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.cgi.nph">
|
|
<term>
|
|
<parameter>cgi.nph</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
If cgi.nph is enabled it will force cgi to always sent Status: 200 with
|
|
every request.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.cgi.redirect-status-env">
|
|
<term>
|
|
<parameter>cgi.redirect_status_env</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
If cgi.force_redirect is turned on, and you are not running under
|
|
Apache or Netscape (iPlanet) web servers, you <emphasis>may</emphasis>
|
|
need to set an environment variable name that PHP will look for to
|
|
know it is OK to continue execution.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
Setting this variable <emphasis>may</emphasis> cause security issues,
|
|
<emphasis>know what you are doing first</emphasis>.
|
|
</para>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.cgi.rfc2616-headers">
|
|
<term>
|
|
<parameter>cgi.rfc2616_headers</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Tells PHP what type of headers to use when sending HTTP response
|
|
code. If it's set to 0, PHP sends a <link xlink:href="&url.rfc;3875">RFC 3875</link>
|
|
"Status:" header that is supported by Apache and other web servers. When this option
|
|
is set to 1, PHP will send <link xlink:href="&url.rfc;2616">RFC 2616</link> compliant
|
|
headers.
|
|
</para>
|
|
<para>
|
|
If this option is enabled, and you are running PHP in a CGI environment (e.g. PHP-FPM)
|
|
you should not use standard RFC 2616 style HTTP status response headers, you should
|
|
instead use their RFC 3875 equivalent e.g. instead of header("HTTP/1.0 404 Not found");
|
|
you should use header("Status: 404 Not Found");
|
|
</para>
|
|
<para>
|
|
Leave it set to 0 unless you know what you're doing.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.fastcgi.impersonate">
|
|
<term>
|
|
<parameter>fastcgi.impersonate</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
FastCGI under IIS (on WINNT based OS) supports the ability to impersonate
|
|
security tokens of the calling client. This allows IIS to define the
|
|
security context that the request runs under. mod_fastcgi under Apache
|
|
does not currently support this feature (03/17/2002)
|
|
Set to 1 if running under IIS. Default is zero.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.fastcgi.logging">
|
|
<term>
|
|
<parameter>fastcgi.logging</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Turns on SAPI logging when using FastCGI. Default is
|
|
to enable logging.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
</para>
|
|
</section>
|
|
|
|
<section xml:id="ini.sect.file-uploads">
|
|
<title>File Uploads</title>
|
|
<para>
|
|
<table>
|
|
<title>File Uploads 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.file-uploads">file_uploads</link></entry>
|
|
<entry>"1"</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.upload-tmp-dir">upload_tmp_dir</link></entry>
|
|
<entry>NULL</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.max-input-nesting-level">max_input_nesting_level</link></entry>
|
|
<entry>64</entry>
|
|
<entry>PHP_INI_PERDIR</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.max-input-vars">max_input_vars</link></entry>
|
|
<entry>1000</entry>
|
|
<entry>PHP_INI_PERDIR</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.upload-max-filesize">upload_max_filesize</link></entry>
|
|
<entry>"2M"</entry>
|
|
<entry>PHP_INI_PERDIR</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.max-file-uploads">max_file_uploads</link></entry>
|
|
<entry>20</entry>
|
|
<entry>PHP_INI_PERDIR</entry>
|
|
<entry></entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
|
|
&ini.descriptions.title;
|
|
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry xml:id="ini.file-uploads">
|
|
<term>
|
|
<parameter>file_uploads</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Whether or not to allow HTTP
|
|
<link linkend="features.file-upload">file uploads</link>. See also the
|
|
<link linkend="ini.upload-max-filesize">upload_max_filesize</link>,
|
|
<link linkend="ini.upload-tmp-dir">upload_tmp_dir</link>, and
|
|
<link linkend="ini.post-max-size">post_max_size</link> directives.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.upload-tmp-dir">
|
|
<term>
|
|
<parameter>upload_tmp_dir</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
The temporary directory used for storing files when doing
|
|
file upload. Must be writable by whatever user PHP
|
|
is running as. If not specified PHP will use the system's default.
|
|
</para>
|
|
<para>
|
|
If the directory specified here is not writable, PHP falls back to
|
|
the system default temporary directory. If
|
|
<link linkend="ini.open-basedir">open_basedir</link> is on, then
|
|
the system default directory must be allowed for an upload to
|
|
succeed.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.upload-max-filesize">
|
|
<term>
|
|
<parameter>upload_max_filesize</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
The maximum size of an uploaded file.
|
|
</para>
|
|
<para>
|
|
<link linkend="ini.post-max-size">post_max_size</link> must be larger than this value.
|
|
</para>
|
|
|
|
&ini.shorthandbytes;
|
|
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.max-file-uploads">
|
|
<term>
|
|
<parameter>max_file_uploads</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
The maximum number of files allowed to be uploaded simultaneously.
|
|
Upload fields left blank on submission do not
|
|
count towards this limit.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</section>
|
|
|
|
<section xml:id="ini.sect.sql-general">
|
|
<title>General SQL</title>
|
|
<para>
|
|
<table>
|
|
<title>General SQL 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.sql.safe-mode">sql.safe_mode</link></entry>
|
|
<entry>"0"</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry>Removed as of PHP 7.2.0</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
|
|
&ini.descriptions.title;
|
|
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry xml:id="ini.sql.safe-mode">
|
|
<term>
|
|
<parameter>sql.safe_mode</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
If turned on, database connection functions that specify default values
|
|
will use those values in place of any user-supplied arguments. For details
|
|
on the default values, see the documentation for the relevant connection
|
|
functions.
|
|
</para>
|
|
<warning>
|
|
<simpara>
|
|
This feature has been <emphasis>REMOVED</emphasis> as of PHP 7.2.0.
|
|
</simpara>
|
|
</warning>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</section>
|
|
|
|
<section xml:id="ini.sect.windows">
|
|
<title>Windows Specific</title>
|
|
<para>
|
|
<table>
|
|
<title>Windows Specific 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.windows-show-crt-warning">windows.show_crt_warning</link></entry>
|
|
<entry>"0"</entry>
|
|
<entry>PHP_INI_ALL</entry>
|
|
<entry></entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
|
|
&ini.descriptions.title;
|
|
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry xml:id="ini.windows-show-crt-warning">
|
|
<term>
|
|
<parameter>windows.show_crt_warning</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
This directive shows the Windows CRT warnings when enabled.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</section>
|
|
|
|
</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
|
|
-->
|