Try one of this solutionthese solutions
In your terminal, type
find / -name "php.ini"In your terminal, type
php -i | grep php.ini. It should show the file file path asConfiguration File (php.ini) Path => /etc"Configuration File (php.ini) Path => /etc"If you can access one of your phpPHP files , open it in a editor (notepadNotepad) and and insert below code
phpinfo();after<?phpinon a new linephpinfo();. This will will tell you the php.iniphp.ini location.You can also talk to phpPHP in interactive mode. Just type
php -ain the the terminal and type phpinfo();phpinfo();after phpthe PHP interpreter initiated.