If you need to make modifications to php.ini in your VPS, there are a couple of ways you can find out where it is located:
a) In the command line, run the following command:
php -i | grep php.ini
The following line will be displayed, containing the path of the php.ini file:
Loaded Configuration File => /usr/local/lib/php.ini
b) you can create a php script with the following content:
When you access this script from your browser, you will also see “Loaded Configuration File” containing the path of php.ini
Remember it is not possible to modify php.ini in shared hosting accounts. To make changes to the PHP configuration, you will need to do so by putting the directives in .htaccess files.