PHP - config file location
Method 1:
Create info.php with code below and open the file in your browser
phpinfo();
You will see the path to the php.ini like in the following screenshot
 ?>)
Method 2
For Linux based OS
php -i | grep "Loaded Configuration File"
For Windows
php -i | findstr /c:"Loaded Configuration File"
Output should be something like this
Loaded Configuration File => /etc/php/7.2/cli/php.ini