How to find the php.ini file
The most simple and portable way to find the php.ini file that's actually being used is to use phpinfo().
Since there may be more than one file named info.php, this avoids the case where you edit a info.php that is not really used by PHP.
Create a file in your web root (for example info.php) with this content:
Now open this page in your browser, and look for the line Configuration File (php.ini) Path in the first block of output telling you which php.ini is loaded.
You can use the find program to find all the php.ini files on your system.
find / -name "php.ini"
You can use the locate program to find all the php.ini files in the locate database (which may not always be up to date).
As with most configuration files, php.ini should reside in /etc.