diff --git a/install/ini.xml b/install/ini.xml index bf796267df..c7f06cf597 100644 --- a/install/ini.xml +++ b/install/ini.xml @@ -134,6 +134,59 @@ include_path = ".;c:\php\lib" within .ini files. Example: open_basedir = ${open_basedir} ":/new/dir". + + Scan directories + + + 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. In + PHP 5.2.0 and later, the scan directory can then be overridden at run time + by setting the PHP_INI_SCAN_DIR environment variable. + + + + It is possible to scan multiple directories by separating them with the + platform-specific path separator (; on Windows, NetWare + and RISC OS; : on all other platforms; the value PHP is + using is available as the PATH_SEPARATOR constant). + If a blank directory is given in PHP_INI_SCAN_DIR, PHP + will also scan the directory given at compile time via + . + + + + Within each directory, PHP will scan all files ending in + .ini in alphabetical order. A list of the files that + were loaded, and in what order, is available by calling + php_ini_scanned_files, or by running PHP with the + option. + + + + + + + + &reftitle.changelog; @@ -160,6 +213,13 @@ include_path = ".;c:\php\lib" and will throw a deprecation warning if used. + + 5.2.0 + + The PHP_INI_SCAN_DIR environment variable can be + set to override the scan directory set via the configure script. + + 5.1.0 diff --git a/reference/info/functions/php-ini-scanned-files.xml b/reference/info/functions/php-ini-scanned-files.xml index 05e9d82cdd..eb59ef89eb 100644 --- a/reference/info/functions/php-ini-scanned-files.xml +++ b/reference/info/functions/php-ini-scanned-files.xml @@ -14,15 +14,13 @@ php_ini_scanned_files returns a comma-separated - list of configuration files parsed after &php.ini;. These files are - found in a directory defined by the - 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 + installation guide. - The returned configuration files also include the path as declared in - the - option. + The returned configuration files include the full path. @@ -30,12 +28,13 @@ &reftitle.returnvalues; Returns a comma-separated string of .ini files on success. Each comma is - followed by a newline. If the directive 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 wasn't set and the + PHP_INI_SCAN_DIR 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 php_ini_scanned_files.