问题描述
我想在我的 Mac图书上使用PHP.但是,安装 Php storm 后,告诉 PHP Interpreter 的位置后,它将导致错误:
I want to do PHP works on My Mac book. However, after I installed Php storm, and tell the PHP Interpreter's location, it causes error:
php-cgi not found
Please ensure that configured PHP Interpreter built as CGI program (--enable-fastcgi was specified
很明显,我应该安装php-cgi
.
我在.它说我应该重新安装 PHP 和一些选项,都选择 fastcgi .
I found an answer on How do I enable fastcgi on my Mavericks using PHP 5.4.24?. It says I should re-install PHP with some options, both fastcgi.
brew install php54 --with-fpm --with-debug --with-cgi --with-libmysql --with-homebrew-curl
brew install fastcgi
我正在考虑:由于我的Mac上具有默认的 PHP ,是否必须重新安装新的 PHP ?我可以安装*cgi
作为默认 php 的插件吗?
I am considering that: Since I have the default PHP on my Mac, must I re-install a new PHP ? Can I install *cgi
as a plugin of the default php ?
推荐答案
要在MacBook上获取最新版本(或您已经拥有的任何版本),请使用:
To get the latest version (or whatever version you already have) on your MacBook, use:
brew install php --with-cgi --with-debug --with-libmysql
请注意,本杰明的答案是相似的.但是,当我已经在v717上安装v54时并不理想,因此仅使用不带该版本的"php"将获得最新的版本.
Note that Benjamin's answer is similar. However, it's not ideal to install v54 when I'm already on v717, so using just "php" without the version would get the latest one.
这篇关于如何在Mac OS(OS X 10.10)中将php-cgi安装为插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!