Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phpStorm problems with php-cgi

Tags:

So I recently change to ubuntu and I am trying to setup my environment again and I manage to install LAMP and phpmyadmin and phpstorm.

But what I can't mange to do is to run the php script from phpStorm when I try to run the program the page gives me a "502 Bad gateway" error and when I go back on phpStorm it tells me that php-cgi was not found.

I have tried to fix the problem but couldn't find any solid answer and I am so confused right now enter image description here

Also I have successfully added the php interpreter and the xDebug

enter image description here

like image 650
Steve Avatar asked Jun 16 '14 08:06

Steve


People also ask

Why is xdebug not working?

Xdebug cannot connect to PhpStorm This means that Xdebug tries to connect to the host and can't make the connection. To fix the issue, set xdebug. remote_connect_back=0 ( xdebug. discover_client_host=false for Xdebug 3) and make sure that xdebug.

What is Xdebug_session_start PhpStorm?

inurl:?XDEBUG_SESSION_START=phpstorm. Google Search: inurl:?XDEBUG_SESSION_START=phpstorm. #Google Dork : inurl:?XDEBUG_SESSION_START #Summary: Xdebug is a php extension that allows to debug php pages, remotely by using DGBp protocol. - Code execution is possible through eval or property_set xdebug commands. -


2 Answers

on linux ubuntu

For PHP5: sudo apt-get install php5-cgi

For PHP7: sudo apt-get install php7.0-cgi

like image 119
CosmoRied Avatar answered Sep 23 '22 02:09

CosmoRied


I faced with the same problem. After replacing /usr/bin/php5-cgi with a little shell script I found that error

Host 'localhost' has multiple addresses. You must choose one explicitly! Couldn't create FastCGI listen socket on port localhost:56468

After commenting 127.0.0.1 localhost in /etc/hosts the problem seems to be solved. After commenting IPv6 hosts the problem seems to be solved:

# The following lines are desirable for IPv6 capable hosts # ::1     localhost ip6-localhost ip6-loopback # ff02::1 ip6-allnodes # ff02::2 ip6-allrouters 
like image 45
vbarbarosh Avatar answered Sep 24 '22 02:09

vbarbarosh