How to locate the php.ini file (xampp) Ubuntu
If you have multiple php-versions (xampp etc) running, I find the easiest is to use:
php --ini
Configuration File (php.ini) Path: /opt/lampp/etc
Loaded Configuration File: /opt/lampp/etc/php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)