To check php.ini path, write a file example x.php with content:
<?php phpinfo(); ?>
Then run : example: http://localhost/x.php
You will see Configuration File (php.ini) Path
and Loaded Configuration File
Edit httpd-xampp.conf
Edit: PHPINIDir
<IfModule php7_module> PHPINIDir "D:\xampp2\php" </IfModule>