简体   繁体   中英

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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM