Write the following inside phpini_path.php
( or AnyNameAsYouLike.php
) and run it in the browser.
<?php phpinfo();?>
Among various other parameters you'll get Loaded Configuration File
parameter which value is the path of php.ini
on the server.
The location of php.ini
depends on server operating system:
Windows (With Xampp Installation):
/xampp/php/php.ini
macOS, OS X:
/private/etc/php.ini
Linux:
/etc/php.ini
/usr/bin/php5/bin/php.ini
/etc/php/php.ini
/etc/php5/apache2/php.ini