In this tutorial, we will help you to find your PHP.ini file on your server.
There are several methods to do this. in this tutorial I will show you two methods. In most cases php.ini is located in /etc/php.ini
php -i | grep "Loaded Configuration File"
And it will show you something like this Loaded Configuration File => /etc/php.ini.
1. Create a public php file on your server (ex: info.php) and add this line in the file:
<?php phpinfo(); ?>
2. Open this file in your browser and you can see the php.ini location on the line with: Loaded Configuration File