I have installed XAMPP on Mac OSX running Yosemite I have created the .bash_profile file like this:
export XAMPP_HOME=/Applications/XAMPP/xamppfiles export P
I managed to solve the problem. On the Mac, the XAMPP bin folder and the php file had the wrong permission, hence it was not working. Secondly, I also had to profile the full path
/bin/php-5.5.15:${PATH}
Thanks