php -i | grep php.ini
It will show you the directory copy and paste the directory, mainly the url (/usr/local/lib/) as bellow:
root@hostname [~]# php -i | grep php.ini
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini