mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Document PHP_INI_SCAN_DIR, since we apparently never did.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@338206 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
f8732f08c5
commit
d082313568
2 changed files with 72 additions and 13 deletions
|
@ -134,6 +134,59 @@ include_path = ".;c:\php\lib"
|
|||
within .ini files. Example: <literal>open_basedir = ${open_basedir}
|
||||
":/new/dir"</literal>.
|
||||
</para>
|
||||
<sect2 xml:id="configuration.file.scan">
|
||||
<title>Scan directories</title>
|
||||
|
||||
<para>
|
||||
It is possible to configure PHP to scan for .ini files in a directory
|
||||
after reading &php.ini;. This can be done at compile time by setting the
|
||||
<option role="configure">--with-config-file-scan-dir</option> option. In
|
||||
PHP 5.2.0 and later, the scan directory can then be overridden at run time
|
||||
by setting the <varname>PHP_INI_SCAN_DIR</varname> environment variable.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
It is possible to scan multiple directories by separating them with the
|
||||
platform-specific path separator (<literal>;</literal> on Windows, NetWare
|
||||
and RISC OS; <literal>:</literal> on all other platforms; the value PHP is
|
||||
using is available as the <constant>PATH_SEPARATOR</constant> constant).
|
||||
If a blank directory is given in <varname>PHP_INI_SCAN_DIR</varname>, PHP
|
||||
will also scan the directory given at compile time via
|
||||
<option role="configure">--with-config-file-scan-dir</option>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Within each directory, PHP will scan all files ending in
|
||||
<literal>.ini</literal> in alphabetical order. A list of the files that
|
||||
were loaded, and in what order, is available by calling
|
||||
<function>php_ini_scanned_files</function>, or by running PHP with the
|
||||
<option>--ini</option> option.
|
||||
</para>
|
||||
|
||||
<informalexample>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Assuming PHP is configured with --with-config-file-scan-dir=/etc/php.d,
|
||||
and that the path separator is :...
|
||||
|
||||
$ php
|
||||
PHP will load all files in /etc/php.d/*.ini as configuration files.
|
||||
|
||||
$ PHP_INI_SCAN_DIR=/usr/local/etc/php.d php
|
||||
PHP will load all files in /usr/local/etc/php.d/*.ini as
|
||||
configuration files.
|
||||
|
||||
$ PHP_INI_SCAN_DIR=:/usr/local/etc/php.d php
|
||||
PHP will load all files in /etc/php.d/*.ini, then
|
||||
/usr/local/etc/php.d/*.ini as configuration files.
|
||||
|
||||
$ PHP_INI_SCAN_DIR=/usr/local/etc/php.d: php
|
||||
PHP will load all files in /usr/local/etc/php.d/*.ini, then
|
||||
/etc/php.d/*.ini as configuration files.
|
||||
]]>
|
||||
</screen>
|
||||
</informalexample>
|
||||
</sect2>
|
||||
<sect2 xml:id="configuration.file.changelog">
|
||||
&reftitle.changelog;
|
||||
|
||||
|
@ -160,6 +213,13 @@ include_path = ".;c:\php\lib"
|
|||
and will throw a deprecation warning if used.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>5.2.0</entry>
|
||||
<entry>
|
||||
The <varname>PHP_INI_SCAN_DIR</varname> environment variable can be
|
||||
set to override the scan directory set via the configure script.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>5.1.0</entry>
|
||||
<entry>
|
||||
|
|
|
@ -14,15 +14,13 @@
|
|||
</methodsynopsis>
|
||||
<para>
|
||||
<function>php_ini_scanned_files</function> returns a comma-separated
|
||||
list of configuration files parsed after &php.ini;. These files are
|
||||
found in a directory defined by the
|
||||
<option role="configure">--with-config-file-scan-dir</option> option
|
||||
which is set during compilation.
|
||||
list of configuration files parsed after &php.ini;. The directories
|
||||
searched are set by a compile time option and, optionally, by an
|
||||
environment variable at run time: more information can be found in the
|
||||
<link linkend="configuration.file.scan">installation guide</link>.
|
||||
</para>
|
||||
<para>
|
||||
The returned configuration files also include the path as declared in
|
||||
the <option role="configure">--with-config-file-scan-dir</option>
|
||||
option.
|
||||
The returned configuration files include the full path.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -30,12 +28,13 @@
|
|||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns a comma-separated string of .ini files on success. Each comma is
|
||||
followed by a newline. If the directive <option
|
||||
role="configure">--with-config-file-scan-dir</option> wasn't set,
|
||||
&false; is returned. If it was set and the directory was empty, an
|
||||
empty string is returned. If a file is unrecognizable, the file will
|
||||
still make it into the returned string but a PHP error will also result.
|
||||
This PHP error will be seen both at compile time and while using
|
||||
followed by a newline. If the configure directive <option
|
||||
role="configure">--with-config-file-scan-dir</option> wasn't set and the
|
||||
<varname>PHP_INI_SCAN_DIR</varname> environment variable isn't set, &false;
|
||||
is returned. If it was set and the directory was empty, an empty string is
|
||||
returned. If a file is unrecognizable, the file will still make it into
|
||||
the returned string but a PHP error will also result. This PHP error will
|
||||
be seen both at compile time and while using
|
||||
<function>php_ini_scanned_files</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
|
Loading…
Reference in a new issue