I find myself searching for the php.ini file from shell frequently. There are several methods to search and I thought I would quickly share a quick command I use:
php -i | grep php.ini
The output is easily readable.
Configuration File (php.ini) Path => /usr/local/lib Loaded Configuration File => /usr/local/lib/php.ini
There you go; easy as that. You can now find your php.ini file using shell ( or find any other file for that matter ).