I have my own PHP
But this PHP is not build for XAMPP?
I can't make Apache use that version of PHP.
If you build a PHP for XAMPP, Apache is automatically using this (new) PHP.
Well, if you have a working other PHP (in another location then /opt/lampp), you can (try to) use this in a CGI setup.