如何使用PHP 5.4.24在Mavericks上启用fastcgi? [英] How do I enable fastcgi on my Mavericks using PHP 5.4.24?

查看:78
本文介绍了如何使用PHP 5.4.24在Mavericks上启用fastcgi?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用PHPStorm 7的内置Web服务器功能,并且我已将解释器指定为PHP 5.4.24,但它在下面始终告诉我.

I am trying to use PHPStorm 7's built-in web server feature and I have specified the interpreter as PHP 5.4.24 but it keeps telling me this below.

如何在Mavericks机器上启用FastCGI.我通过在终端上执行php -i来检查是否未配置/启用它.任何帮助,将不胜感激.我想在浏览器中测试应用程序.

How do I enable FastCGI on a Mavericks machine. I checked that it isn't configured/enabled by doing php -i on my Terminal. Any help would be appreciated. I want to test apps in the browser.

php-cgi not found
Please ensure that configured PHP Interpreter built as CGI program (--enable-fastcgi was specified)

推荐答案

如果尚未完成,请安装Homebrew:

If it's not already done install Homebrew :

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

现在,我们已经有了Homebrew,请在您的终端上输入php存储库:

Now, that we've Homebrew, tap php repositories by entering this on your terminal :

brew tap josegonzalez/php
brew tap homebrew/dupes

检查哪些选项可用于PHP 5.4:

Check what options are available for PHP 5.4 :

brew options php54

现在安装/构建具有某些选项的PHP 5.4(在您的情况下为带有CGI的PHP-FPM):

Now install/build PHP 5.4 with some option (in your case PHP-FPM with CGI) :

brew install php54 --with-fpm --with-debug --with-cgi --with-libmysql --with-homebrew-curl
brew install fastcgi

注意:如果您不打算使用Apache add --without-apache,如果您需要其他东西,只需检查选项并添加所需的内容

Note : If you're not going to use Apache add --without-apache, if you need others things, just check the options and add what you need

现在,通过在终端中键入以下命令检查是否启用了PHP-FPM:

Now, check if PHP-FPM is enable by typing this in your terminal :

php-fpm -v

如果得到这个:

PHP 5.4.24(fpm-fcgi)版权(c)

PHP 5.4.24 (fpm-fcgi) Copyright (c)

1997-2013,PHP Group Zend Engine v2.4.0,版权所有(c)1998-2013

1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013

Zend Technologies

Zend Technologies

您刚刚像老板一样将PHP和FCGI一起安装了.

You just installed PHP with FCGI like a boss..

这篇关于如何使用PHP 5.4.24在Mavericks上启用fastcgi?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆