Skip to content

Instantly share code, notes, and snippets.

@sangar82
Created May 27, 2014 13:01
Show Gist options
  • Save sangar82/53f5a0485bfd2041f4c4 to your computer and use it in GitHub Desktop.
Save sangar82/53f5a0485bfd2041f4c4 to your computer and use it in GitHub Desktop.
use PHP version of mamp
alias phpmamp='/Applications/MAMP/bin/php5.3/bin/php'
or
I have created a symlink at the original php location.
1. Locate your osx php version with:
which php
The result should be:
/opt/local/bin/php
2. Backup (move) your original php binary:
sudo mv /opt/local/bin/php /opt/local/bin/php.bak
3. Create the symlink:
sudo ln -s /Applications/MAMP/bin/php/php5.4.4/bin/php /opt/local/bin/php
4. Run your new php version:
php -v
Now you can use the php command with the newest version.
http://stackoverflow.com/questions/4262006/how-to-use-mamps-version-of-php-instead-of-the-default-on-osx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment