View Issue Details

IDProjectCategoryView StatusLast Update
0000206XdebugUncategorizedpublic2020-03-12 17:07
ReporterMarcusBointon Assigned Toderick  
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionnot fixable 
Summary0000206: Escape binary output
Description

If I get a PHP error and xdebug displays local variables, and one of those variables contains something binary like an image, I usually find that it corrupts the terminal, turning all text in the terminal into gibberish, presumably because the binary data contains terminal escape sequences. I have to kill the terminal and reopen it to restore readability. Can the output be somehow escaped to avoid this?

TagsNo tags attached.
Operating Systemall
PHP Version5.1.6

Activities

derick

2006-10-18 15:12

administrator   ~0000476

I just checked, and I am already escaping ascii 0 to ascii 31... and can therefore not reproduce your problem. Could you provide a short test case for me please? (Including all settings that you make?)

MarcusBointon

2006-10-24 01:29

reporter   ~0000484

OK, I had a try at reproducing it, and you're right in that I can't get it to happen with the local vars display, however, it does happen with var_dump, so I guess I must have been confused - sorry about that. This example causes a nice exploding terminal for me:

<?php
class z {
public $zz;
}
$zx = new z;
$zx->zz = file_get_contents('image.png');
var_dump($zx);
?>

I don't know if this behaviour is intended or not, but I can't think of any circumstances I'd want it.

derick

2006-11-21 20:01

administrator   ~0000492

When html_errors is turned off Xdebug will use PHP's internal var_dump function. This function exhibits this problem and your issue can be reproduced even when Xdebug is not loaded. I agree that this should be addressed, but it should be addressed in PHP itself.

Issue History

Date Modified Username Field Change
2006-10-17 09:22 MarcusBointon New Issue
2006-10-18 15:12 derick Note Added: 0000476
2006-10-18 15:12 derick Status new => feedback
2006-10-24 01:29 MarcusBointon Note Added: 0000484
2006-11-21 20:01 derick Status feedback => resolved
2006-11-21 20:01 derick Resolution open => not fixable
2006-11-21 20:01 derick Assigned To => derick
2006-11-21 20:01 derick Note Added: 0000492
2020-03-12 16:56 derick Severity tweak => feature
2020-03-12 17:07 derick Category Feature/Change request => Uncategorized