How to find the corresponding configuration files of php?
Run the following command from the Terminal:

/usr/bin/php -i |grep 'Configuration File'


This will tell you the path where it looks after php.ini, and the name of the loaded configuration file (if no php.ini exists where it looks for it, none might be loaded).

Change the path /usr/bin/php to the php you want to check when you have multiple versions of PHP installed.