I've been tried to export a custom PATH on ~/bash_profile
file by adding:
export XAMPP_HOME=/Applications/XAMPP
export PATH=${XAMPP_HOME}/bin:${PATH}
export PATH
But this doesn't work because the PHP path is incorrect.
Furthermore, I also ran phpinfo()
and get the Configuration File
but the path is /opt/lampp/etc
that doesn't exist.
Therefore, I just need to change the default PHP CLI from version 5.5.6 to 7.1.11.
Can someone here please give me a help!!!?
After hours searching on Google, I've reached at this video that pointed me to the right point: https://www.youtube.com/watch?v=vT5luUaAcQ8
Yes! Now I can change my PHP CLI version to any other since 5.3.
Here are the steps from the video:
- To get started, go to https://php-osx.liip.ch/
- Scroll down to the One Line Installation section and copy the command for the version of PHP that you want to install
- Open up a Terminal window
- Paste the command and press Enter
- The PHP OSX installer will take care of loading the new version of PHP into the pre-installed copy of Apache
- If you want to run the new version of PHP from the command line, you’ll need to update your PATH
- To do that, you’ll need to add a line to your .bash_profile file.
- Type vim ~/.bash_profile and press Enter
- Press Shift-G to jump to the end of the file
- Press i to enter Insert mode
- Type export PATH=/usr/local/php5/bin:$PATH
- Press Escape to exit Insert mode
- Type :wq to save and quit
- Now you can close your Terminal window and open a new window to use the new path