Skip to content

Instantly share code, notes, and snippets.

@byeblogs
Created October 21, 2017 09:15
Show Gist options
  • Select an option

  • Save byeblogs/2edab0449970ce0ceca62bc65c6ef498 to your computer and use it in GitHub Desktop.

Select an option

Save byeblogs/2edab0449970ce0ceca62bc65c6ef498 to your computer and use it in GitHub Desktop.
Problem With Upgrade PHP VERSION & CHANGE PATH !
To change the php path in mac Sierra, i did the steps mentioned but still when i run
which php
I still get
/usr/local/bin/php
I tried restarting terminal and even mac but it is still the same path. I have followed every steps
change bash_profile
export PATH="/Applications/XAMPP/xamppfiles/bin/php-7.0.15:$PATH"
did source ~/.bash_profile
Any idea why the path is so stubborn
Solution:
For XAMPP, path I used was wrong. It should be
export PATH="/Applications/XAMPP/bin:$PATH"
*** IF YOU HAVE A PROBLEM WITH ROOT
Presuming that the issue really is a path problem, the default Mac OS X path (on 10.7) appears to be:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
So you can set this by running
export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment