Changing PHP configuration via the Windows registry
When running PHP on Windows, the configuration
values can be modified on per-directory basis using
the Windows registry. The configuration values are stored
in the registry key HKLM\SOFTWARE\PHP\Per Directory
Values, in the sub-keys corresponding to the path names.
For example, configuration values for the directory
c:\inetpub\wwwroot would be stored in the key HKLM\SOFTWARE\PHP\Per
Directory Values\c\inetpub\wwwroot. The settings for
the directory would be active for any script running
from this directory or any subdirectory of it. The values
under the key should have the name of PHP configuration
directive and the string value. PHP constants in the
values would not be parsed.
Other interfaces to
PHP
Regardless of the interface to PHP you can change certain values at runtime of your scripts through ini_set(). The following table provides an overview at which level a directive can be
set/changed.
Table 4-1. Definition of PHP_INI_* constants
| Constant |
Value |
Meaning |
| PHP_INI_USER |
1 |
Entry can be
set in user scripts |
| PHP_INI_PERDIR |
2 |
Entry
can be set in php.ini, .htaccess or httpd.conf
|
| PHP_INI_SYSTEM |
4 |
Entry
can be set in php.ini or httpd.conf |
| PHP_INI_ALL |
7 |
Entry can be
set anywhere |
You can view the settings of the configuration
values in the output of phpinfo(). You can also access the values of individual configuration directives using
ini_get() or get_cfg_var().