Reputation: 21
I have a question about how to set PHP_INI_*
modes and where to set them. I found this link about from http://php.net/manual/en/configuration.changes.modes.php. It says there are mode PHP_INI_USER
, PHP_INI_ALL
, PHP_INI_SYSTEM
, PHP_INI_PERDIR
. The user notice above says that Apache have several directives to change PHP_INI_*
mode configuration, but I can't find these directives in httpd.conf
. Which Apache configuration files are they in? For example, can I change configuration mode from PHP_INI_SYSTEM
to PHP_INI_USER
? How can I do that?
Upvotes: 1
Views: 1216
Reputation: 157927
Whether you can set a php_ini per user or per dir level depends on multiple conditions:
The php_ini directive itself. Refer to the documentation of the specific ini directive to know if it is allowed to set per user or per dir or whatever
The value of the directive user_ini.filename
If it is omitted or empty, then setting php_ini directives per user level isn't possible. Thats because PHP does not know where to search for that user.ini files
When in apache conf php_ini directives can be set per directory inside a <directory>
tag, or in a .htaccess
following the syntax described here. Also note that the (apache) AllowOveride
settings for this directories MUST be set to either AllowOverrideOptions
or AllowOverrideAll
in order to do so.
Upvotes: 1