3

In phpinfo it shows you the "Master" and "Local" values for ini settings.

I want to compare them to determine whether a setting has changed since the start of the script.

Getting the local values is easy:

<?php
$local = ini_get('setting');

But I can't find anything describing how to get the master value.

J V
  • 11,402
  • 10
  • 52
  • 72
  • This might help you: http://stackoverflow.com/questions/19520744/what-is-the-difference-between-local-value-and-master-value – Bogdan Nov 15 '15 at 12:19

1 Answers1

5

I think that get_cfg_var() is what you are looking for.

To quote a comment in the manual

The difference between ini_get() and get_cfg_var() is as follows:

  • ini_get(): returns the current value in .htaccess or as defined in PHP_INI_USER or PHP_INI_PERDIR

  • get_cfg_var(): returns the values defined in the php.ini

Community
  • 1
  • 1
kero
  • 10,647
  • 5
  • 41
  • 51