Where are ini files on MacOsX Sierra?

Current versions of Mac OS X do not ship with a php.ini. PHP uses internal defaults for all settings.

There is a sample configuration file installed at /etc/php.ini.default. If you need to customize PHP settings, you can use that file as a template to create a configuration file at /etc/php.ini. PHP will read settings from that file if it's present.


Edit: The following method was tested and I confirm it works on macOS, Linux and Windows' CMD and Bash

All you need to type in the terminal/CMD/Bash is

php --ini

It will render something like:

Configuration File (php.ini) Path: /usr/local/etc/php/5.6
Loaded Configuration File:         /usr/local/etc/php/5.6/php.ini
Scan for additional .ini files in: /usr/local/etc/php/5.6/conf.d
Additional .ini files parsed:      (none)

There is a PHP function called php_ini_loaded_file() which returns the path of php.ini which is loaded.

Try the code below.

<?php
$inipath = php_ini_loaded_file();

if ($inipath) {
    echo 'Loaded php.ini: ' . $inipath;
} else {
    echo 'A php.ini file is not loaded';
}
?>