Skip to content

Instantly share code, notes, and snippets.

@BernardoSilva
Created September 5, 2013 16:25
Show Gist options
  • Save BernardoSilva/6452543 to your computer and use it in GitHub Desktop.
Save BernardoSilva/6452543 to your computer and use it in GitHub Desktop.
These are the steps to change between the PHP that comes with OSX installation for the MAMP php version you want to run by default when you write php on command line
#this is a way to change the default php to MAMP php version you want
#if you do `which php` you eill see: /usr/bin/php that is the php that comes with OSX installation
which php
#do this to export the path to you .profile ou .bash_profile
export PATH=/Applications/MAMP/bin/php/php5.4.4/bin:$PATH
#then run this command to update the path
source ~/.bash_profile
#now this command should output /Applications/MAMP/bin/php/php5.4.4/bin/php
which php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment