laochiv
laochiv

Reputation: 2463

Reconciling Php Version on OSX Mavericks

I have recently upgraded my OSX to Mavericks. Before the upgrade I had two copies PHP version 5.3. One was running for Apache and one for Command line. This was fine, until after the upgrade I now have PHP 5.4 running on Apache BUT still have 5.3 running for command line. I need to bring these to the same version. Worst case, I would get a new copy of 5.4 running for command line, and best case I would just configure the command line to use the pre installed copy of php. I have tried to add the folder location for my apache copy of php to my path, but it didn't work. Any help on this would be appreciated. Thanks!

Upvotes: 1

Views: 272

Answers (1)

laochiv
laochiv

Reputation: 2463

Ok I got it. I couldn't find this answer anywhere so hopefully this will be helpful to someone. I created test.php with

echo exec("which php");

And ran that. Then I ran

which php 

from the command line. Then I made the symlink which from command line point at the location found by looking at test.php with my browser.

Upvotes: 2

Related Questions