How to check a PHP configuration option value using the command line?

command-line
(Dmitry Fedyuk) #1
php -i | grep <option name>

E.g.:

php -i | grep opcache.memory_consumption

The first value is local, the second is master.

master is either the value compiled into PHP, or set via a main php.ini directive. e.g. 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…

0 Likes

How to fix the «Fatal error: Allowed memory size exhausted in Composer/Cache.php»?