0

This is a snippet from my .bash_profile

export MAMP_PATH=/Applications/MAMP/bin/php/php5.4.10/bin/php
export PATH="$MAMP_PATH:$PATH"

but when i run

$ php --version

I get this output:

PHP 5.3.15 with Suhosin-Patch (cli) (built: Jul 31 2012 14:49:18) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

Why!?

sensorario
  • 20,262
  • 30
  • 97
  • 159
  • By any chance, do you have multiple PHP installations? – Peon Mar 06 '13 at 12:03
  • MAMP has ability to use several versions. What is the Preference setting? – jtheman Mar 06 '13 at 12:03
  • This probably belongs at [http://serverfault.com/](http://serverfault.com/) – Boaz Mar 06 '13 at 12:03
  • The CLI version is most likely pointing at the OS bundled version of PHP. Take a look at this thread - http://stackoverflow.com/questions/4262006/how-to-use-mamps-version-of-php-instead-of-the-default-on-osx – DrBeza Mar 06 '13 at 12:24

1 Answers1

1

Find out which php is being called by running the command which php.

The solution will probably be to change MAMP_PATH to this:

export MAMP_PATH=/Applications/MAMP/bin/php/php5.4.10/bin

(In the path you specify a directory, not a binary)

akirk
  • 6,757
  • 2
  • 34
  • 57