.user.ini files
Since PHP 5.3.0, PHP includes support for configuration INI files on a
per-directory basis. These files are processed only by
the CGI/FastCGI SAPI. This functionality obsoletes the PECL htscanner
extension. If you are using Apache, use .htaccess files for the same
effect.
In addition to the main php.ini file, PHP scans for INI files in each
directory, starting with the directory of the requested PHP file, and
working its way up to the current document root (as set in
$_SERVER['DOCUMENT_ROOT']). In case the PHP file is
outside the document root, only its directory is scanned.
Only INI settings with the
modes PHP_INI_PERDIR
and
PHP_INI_USER
will be recognized in .user.ini-style INI
files.
Two new INI directives,
user_ini.filename and
user_ini.cache_ttl
control the use of user INI files.
user_ini.filename sets the name of the file PHP looks for
in each directory; if set to an empty string, PHP doesn't scan at all. The
default is .user.ini.
user_ini.cache_ttl controls how often user INI files are
re-read. The default is 300 seconds (5 minutes).
philsward at gmail dot com ¶10 months ago
If you have no idea what "PHP_INI_PERDIR" or "PHP_INI_USER" are or how they relate to setting a .user.ini file, take a look at the ini.list page: http://www.php.net/manual/en/ini.list.php
Basically, anything in the "Changeable" column labeled as PHP_INI_SYSTEM can't be set in the .user.ini file (so quit trying). It can ONLY be set at the main php.ini level.
interfaSys ¶3 years ago
This article should be made clearer.
".htaccess-style INI files" meant to me that the ini settings had to follow the syntax used in .htaccess, but this is not the case!
You have to use
register_globals=on
and not
php_flag register_globals on
Also, the changes can take a while to propagate to all processes if you have a long process time out.
Restarting php-fpm can give you an answer quicker :)