In many instances, locating the active php.ini file is very simple. Run the following command to view the instances of php.ini, including “Loaded Configuration File”:
php.ini
# php --ini
Example output:
# php --ini Configuration File (php.ini) Path: /etc Loaded Configuration File: /etc/php.ini Scan for additional .ini files in: /etc/php.d Additional .ini files parsed: /etc/php.d/bcmath.ini, /etc/php.d/curl.ini,
Alternate Method:
No matter what control panel you are using, the complete way to find what php.ini file to edit for specific domain is by the following:
Create file inside your site, name it for example info.php, with content:
<? phpinfo() ?>
Open the file in your browser window, like http://domain.tld/info.php
Search for line Loaded Configuration File, which will show you full path to php.ini file.