We use XAMPP, however the php installation location of XAMPP is separate from what is used when php is installed via command line.
After a full clean up of the installation,
We tried to link up Php in XAMPP to be used as system default, ie like the default php, from terminal php command will execute the xampp version of php.. and we don’t have to write the full path everytime we use php from command line!
The first command we executed was
sudo ln -s /opt/lamp/bin/php /usr/bin/php
However after this even, the changes were not reflected via terminal
Then we did some changes in the bash.
Appended the following to the last line
and saved the file and exited.
Now when we do
echo $PATH in the terminal, we see that
/opt/lampp/bin has been included.
Now we do a php -v from command line. And woah PHP runs properly! The version currently in our xammp installation is 5.6.
Note: We are using Ubuntu 12.04 LTS