4

I'm using PHPStorm 9 on Mac OSX Yosemite 10.10 and when I try to open the project in the browser it returns a "502 Bad Gateway" error.

In PHPStorm it says php-cgi not found

Please ensure that configured PHP interpreter built as CGI program (--enable-fastcgi was specified)

I followed the answer by GotchaRob in this question, but it didn't help. Unfortunately I can't post comments yet, so I've created a new question.

I would really appreciate if someone could provide some help. Thank you.

Community
  • 1
  • 1
al_x13
  • 305
  • 1
  • 3
  • 7
  • What output does `php-fpm -v` give you? – Oldskool Jul 14 '15 at 08:14
  • It returns: `PHP 5.5.14 (fpm-fcgi) (built: Sep 9 2014 19:09:39) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans` – al_x13 Jul 14 '15 at 08:34
  • That is the output you'd want to see. Are you sure you selected the php-fpm binary (usually `/usr/sbin/php-fpm`) as interpreter in your PhpStorm install and not the native php binary? – Oldskool Jul 14 '15 at 13:53
  • as an interpreter I choose `/usr/bin/php` (where php.ini is located) - http://take.ms/pMBLa. If I choose `/usr/sbin/php-fpm` PHPStorm says php is not installed – al_x13 Jul 14 '15 at 14:05

2 Answers2

5

i fix this problem with this solution

http://barratmp.blogspot.ru/2014/10/the-core-yosemite-php-version-is-5.html

but i install only php5.6

brew install homebrew/php/php56

after installation pointed the way to php6.5 in phpstorm

p.Omelchenko
  • 51
  • 1
  • 3
0

I couldn't make it work with p.Omelchenko's solution, so I tried what is suggested in this website by aswin_0348 and it worked like a charm!

Just sudo apt-get install php7.3-cgi

Community
  • 1
  • 1
syfantid
  • 366
  • 5
  • 20