Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

When I display phpinfo(); I see two columns: local value and master value. When will the web server choose local value and when will it choose master value?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
353 views
Welcome To Ask or Share your Answers For Others

1 Answer

master is either the value compiled into PHP, or set via a main php.ini directive. I.e., the value that's in effect when PHP fires up, before it executes any of your code.

local is the value that's currently in effect at the moment you call phpinfo(). This local value is the end result of any overrides that have taken place via ini_set() calls, php_value directives in httpd.conf/.htaccess, etc.

For example,

php.ini:     foo=bar
httpd.conf:  php_value foo baz
.htaccess:   php_value foo qux
ini_set:     ini_set('foo', 'kittens');
.user.ini    foo=bar   # this file works conditionally see https://stackoverflow.com/a/32193087/1818723

Given that, the master value is qux, and the local value is kittens.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...