Apparently the .user.ini file cannot be used to add dynamic extensions. For example, "extension=php_pdo_mysql.dll" has no effect in a .user.ini file (as of PHP 5.3.10 using FastCGI on IIS 6).
.user.ini ファイル
PHP 5.3.0 以降、PHP はディレクトリ単位での .htaccess 風の INI ファイルをサポートするようになりました。 このファイルは、CGI/FastCGI SAPI の場合にのみ処理されます。 この機能は、PECL htscanner 拡張モジュールを置き換えるものです。 Apache を使用している場合は .htaccess ファイルを使えば同じ機能を実現できます。
メイン php.ini ファイルに加えて、PHP が各ディレクトリの INI ファイルをスキャンします。 リクエストされた PHP ファイルがあるディレクトリから始まり、 現在のドキュメントルート ($_SERVER['DOCUMENT_ROOT']) まで順にたどっていきます。PHP ファイルがドキュメントルート配下以外の場所にある場合は、 PHP ファイルがあるディレクトリだけをスキャンします。
.user.ini 形式の INI ファイルがサポートするのは、
モードが PHP_INI_PERDIR および
PHP_INI_USER の項目のみです。
新しい INI ディレクティブ user_ini.filename および user_ini.cache_ttl で、ユーザー INI ファイルの使用法を制御します。
user_ini.filename は、PHP が各ディレクトリで探すファイルの名前を設定します。 空文字列を指定した場合は何も探しません。デフォルトは .user.ini です。
user_ini.cache_ttl は、ユーザー INI ファイルの再読込頻度を設定します。 デフォルトは 300 秒 (5 分) です。
As of PHP 5..3.6, applicable .user.ini files are *not* listed or identified in phpinfo() output.
A .user.ini file can be in effect even when phpinfo() shows "additional .ini files parsed: (none)"
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 :)
Currently .user.ini files aren't read when using php-fpm, instead you can use [HOST] and [PATH] sections in your main php.ini to set per directory and per domain settings: http://us3.php.net/manual/en/ini.sections.php
