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.
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)
Add the CGI role service by going to Server Manager > Roles > Add Role Services. Under Application Development, select the CGI check box. This enables both the CGI and FastCGI services (selecting CGI enables both CGI and FastCGI).
Enable FastCGI Support in IISGo to Server Manager > Roles > Add Role Services. On the Select Role Services page, select the CGI check box. This enables both the CGI and FastCGI services.
PHP-FPM is a service which executes PHP code on behalf of a web server. As NGINX is unable to natively execute PHP code, it can be onfigured to pass all . php files over to PHP-FPM.
If it's not already done install Homebrew :
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Now, that we've Homebrew, tap php repositories by entering this on your terminal :
brew tap josegonzalez/php
brew tap homebrew/dupes
Check what options are available for PHP 5.4 :
brew options php54
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
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
Now, check if PHP-FPM is enable by typing this in your terminal :
php-fpm -v
If you get this :
PHP 5.4.24 (fpm-fcgi) Copyright (c)
1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013
Zend Technologies
You just installed PHP with FCGI like a boss..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With