2

I have installed MAMP on OS X Snow Leopard (10.6.8) and I want to change the default path for PHP.

I tried both of the answers on this question, and on this question, and in this thread but when I'm trying which php in Terminal I still get /usr/bin/php.

I'm starting to get the impression that I'm doing something profoundly wrong, so any idea about what that might be, will be greatly appreciated.

Thanks in advance.

2 Answers2

0

It turns out that there was an issue with permissions. Everything was fixed by running this command:

sudo chmod -R 764 /Applications/MAMP/bin/php5.3/bin

0

The correct path to PHP in MAMP is this:

/Applications/MAMP/bin/php/php5.3/bin

NOT

/Applications/MAMP/bin/php5.3/bin

First view your actual PHP:

which php

If you actual path is: /usr/bin/php you can change with this commands:

In you personal folder:

vim ~/.bash_profile

Then copy this text:

export PATH=/Applications/MAMP/bin/php/php5.5.3/bin:$PATH

Type esc and :wq to save & exit.

Solved!