/Users/David
for exmaple, you can create a .bash_profile
. In here you can export variables and then add them to your path.
Open up the file to edit it in your favourite editor, I use vim.
Then you can add in your path
[js]export MAMP_PHP=/Applications/MAMP/bin/php/php5.3.6/bin
export PATH="$MAMP_PHP:$PATH"[/js]
You want your bit ahead of the $PATH
as that already includes /usr/bin
which is where the system PHP lives. So the system will always find your MAMP version first.
Save this file and then reboot your Terminal and you'll see that you should get your MAMP version.
To test I use php -v
as OSX Lion uses 5.3.10 and my MAMP is using 5.3.6
You can also test using which php
which will output the path to your current php executable.Revisions
- December 8, 2015 @ 22:31:17 [Current Revision] by PeterLugg
- December 8, 2015 @ 22:31:17 by PeterLugg
- December 8, 2015 @ 22:30:35 by PeterLugg
Revision Differences
There are no differences between the December 8, 2015 @ 22:31:17 revision and the current revision. (Maybe only post meta information was changed.)
No comments yet.