View Issue Details

IDProjectCategoryView StatusLast Update
0001158XdebugUsage problems (Wrong Results)public2017-01-03 18:43
ReporterrazvanphpAssigned Toderick 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionunable to reproduce 
PlatformLinuxOSDebianOS VersionJessie
Product Version2.3.2 
Target VersionFixed in Version 
Summary0001158: xdebug captures fatal errors in the log instead of showing them in the browser
DescriptionWhen a fatal error occurs, with xdebug extension loaded, the php fatal errors are not displayed to the browser anymore. Instead, nginx logs this errors to the log file and the browser gets 502 Bad Gateway:

2015/06/07 20:19:52 [error] 520#520: *98 FastCGI sent in stderr: "PHP message: PHP Fatal error: Call to undefined method yii\helpers\Html::link() in /usr/share/nginx/file.php on line 33
PHP message: PHP Stack trace:
.........
2015/06/07 20:19:52 [error] 520#520: *98 upstream sent too big header while reading response header from upstream, client: 10.0.0.1, server: site.dev, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "site.dev", referrer: "http://site.dev/"

I tried both xdebug 2.2.5 and I also compiled 2.3.2. Exact PHP version: PHP 5.6.7-1 (built: Mar 24 2015 12:30:15). Display errors is enabled, and it works fine if I disabled the xdebug extension.

Normally Yii2 Framework displays a nice formatted exception, so maybe it is interfering with xdebug?
Steps To ReproduceIt happens all the time in my dev setup, except if I put some break points, and click play, then the expected exception is correctly shown into the browser.

If you need more debug information I am more than happy to provide them.
TagsNo tags attached.
Operating System
PHP Version5.6.0-5.6.4

Activities

razvanphp

2015-06-07 21:03

reporter   ~0003112

fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;

Setting this in nginx fixes the problem. I can see that the stacktrace is not included in the log if xdebug is not loaded, so it must be too big.

This still does not explain why the HEADERS are too big, and not the body. I read somewhere that this can also be caused by invalid headers.

Also, as I said, it works if I have a break point in execution and the I hit play, even with the default buffer sizes.

derick

2016-12-03 13:18

administrator   ~0003879

Is this still causing a problem for you? I have not managed to reproduce this.

derick

2017-01-03 18:43

administrator   ~0004116

I could not reproduce this, as there was no reproducible case, and no additional information was presented. I am therefore closing this report.

Issue History

Date Modified Username Field Change
2015-06-07 20:40 razvanphp New Issue
2015-06-07 21:03 razvanphp Note Added: 0003112
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2016-12-03 13:18 derick Note Added: 0003879
2016-12-03 13:18 derick Assigned To => derick
2016-12-03 13:18 derick Status new => feedback
2017-01-03 18:43 derick Note Added: 0004116
2017-01-03 18:43 derick Status feedback => resolved
2017-01-03 18:43 derick Resolution open => unable to reproduce