ilyes kooli
ilyes kooli

Reputation: 12043

Source of phpinfo fields

Is there a way to know where is set a given PHP config property?

When I run phpinfo() I get a list of properties with values, example:

max_input_time 60 120

Here I know that the actual value of max_input_time is 120.

Is there a way to know where this values was set? global php.ini? local php.ini? hardcoded?

Upvotes: 3

Views: 268

Answers (3)

Mike Mackintosh
Mike Mackintosh

Reputation: 14237

There is no way to differentiate if an option was set via ini_set, .htaccess php_value or php.ini.

Upvotes: 1

Robbie
Robbie

Reputation: 17720

The master settings come from the PHP config file (php.ini). You can find the source of this file near the top in the section "Loaded Configuration File" (will read something like "/etc/php5/cgi/php.ini" or "c:\Program Files\php5\php.ini" (Prior to PHP 5.2 the value is shown in "Configuration File (php.ini) Path")

The local settings come from three places; a directive in a apache config (httpd.conf or vhosts.conf etc), a directive in .htaccess, or an ini_set() that comes before the pho_info() call.

The other place to look is declared in the php_info - top table "additional .ini files parsed" - check in there too.

Upvotes: 0

acme
acme

Reputation: 14856

It's right on top of the output. Look for "Loaded Configuration File" and "Additional .ini files parsed".

Upvotes: 1

Related Questions