Mario Haubenwallner
Mario Haubenwallner

Reputation: 1925

502 Bad Gateway with Zend Debugger (nginx+php5-fpm) and PHPStorm

I'm trying to set up the debugging on a server but it won't work.

Here is my setup:

Now my PHPStorm settings:

File -> Settings -> Languages & Frameworks -> PHP

File -> Settings -> Languages & Frameworks -> PHP -> Debug

File -> Settings -> Languages & Frameworks -> PHP -> Server

New server added: 192.168.1.40:80 - Zend Debugger

[x] Use path mappings: File/Directory: \192.168.1.50\shared\www\myProject

Absolute path on the server: /shared/www/myProject

I've configured zDebug for Chrome this way:


Now with the config out of the way here is my problem with the debugging:

If I click on "Debug this page" (doesn't matter if I use the marklets or the Chrome extension) the site loades a minute or so and I'm getting a 504 Gateway Timeout from nginx.

Now if I click on the "Start Listening for PHP Debug Connections" (for zero-config debugging) and try the debug again, I'll get instantly a 502 Bad Gateway.

I really have no idea why I'm getting this error. Nginx error logs say this:

2015/11/04 18:11:05 [error] 4613#0: *107 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.1.10, server: 192.168.1.40, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "192.168.1.40"

If I disable the debugging there is no error at all.

Does someone has any ideas about this problem? I've searched all PHPStorm documentation but to no avail.

Thank you!

Upvotes: 1

Views: 677

Answers (0)

Related Questions