Install php-cgi on Mac OS X Yosemite

      Install php-cgi on Mac OS X Yosemite已关闭评论

You can install PHP easily with Homebrew:

brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew install php54

Homebrew doesn’t change the version of the system PHP. System and Homebrew versions are located in different directories. This is how it looks like for me:

System /usr/bin/php:

/usr/bin/php -v
PHP 5.4.30 (cli) (built: Jul 29 2014 23:43:29)

Homebrew /usr/local/bin/php:

/usr/local/bin/php -v
PHP 5.6.2 (cli) (built: Nov 14 2014 10:30:28)