PHP comes with two native functions to show which config file is loaded :
Depending on your setup, Apache and CLI might use different ini files. Here are the two solutions :
Just add the following in a php file and open it in your browser
print php_ini_loaded_file();
print_r(php_ini_scanned_files());
Copy-paste in your terminal :
php -r 'print php_ini_loaded_file(); print_r(php_ini_scanned_files());'