So this will be obvious to you unix/linux geeks, but it took me a while to remember, so I’m putting it here.

I was trying to use the new install of PHP (on the command line) that I’d added instead of the default 4.4.7 install that comes with OS X 10.4. But nobody really says how to do that anywhere.

When I ran “which php” it said I was using /usr/bin/php. I wanted to be using usr/local/php5.

So, in .bash_profile for my user, I added the line:
# Set PATH for php (override default /usr/bin/php)
export PATH=/usr/local/php5/bin/:$PATH

then I saved that and ran “source .bash_profile”.

Now when I run “which php” it says /usr/local/php5/bin//php.

Yay!

Advertisements