简体   繁体   中英

Homebrew update to PHP - Installed newer version but still showing PHP 5.4

I am tying to update the PHP on my Mac OS X machine from 5.4 to 5.6. I am using Homebrew. I installed PHP 5.6 using Homebrew successfully: brew install php56

However, when I rebooted the unix shell, and typed the command php -v, it still shows PHP 5.4.10.

I ran: export PATH="$(brew --prefix homebrew/php/php56)/bind:$PATH".

However, the php -v has not changed to 5.6. What can I do to get my system to use 5.6? Thanks!

Mac OSX has an own php installed. The same for Python and Ruby. With Homebrew, you installed a new/extra version of php (not an update of the pre-installed version) which runs perfect separately.

The php command points to the native Mac OSX php. If you run Homebrew, the webserver will use his own php version.

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