View Issue Details

IDProjectCategoryView StatusLast Update
0001179XdebugStep Debuggingpublic2021-04-14 16:04
Reporterstan Assigned To 
PrioritynoneSeverityminorReproducibilityalways
Status resolvedResolutionunable to reproduce 
OSFedora 22OS VersionFedora 22 
Product Version2.3.3 
Summary0001179: Remote debugging terminates
Description

Remote debugging terminates on a line which calls a function in ioncube encoded file. This wasn't happening on my previous server which was ubuntu 12.04.

I contacted ioncube. The response below:
"phpStorm uses xDebug and xDebug is unable to skip encoded files. We would suggest contacting the xDebug developer to ask about changing xDebug to handle encoded files better."

Steps To Reproduce
  1. Turn off remote debugging (remove cookie).
  2. Reload page in browser -> code runs without problems.
  3. Turn on remote debugging (add cookie).
  4. No breakpoints.
  5. Reload page in browser -> code execution terminates on a line which calls function in ioncube encoded file.

Response in browser is:
"The connection was reset"

If I put breakpoint on the encoded function, then step over, the debugging and execution terminates. If I put a breakpoint after the function, it never breaks.

On my previous server (ubuntu 12.04), the encoded function was normally skipped when stepping over. The same happened when I attempted to step into.

The code is part of magento with an extension which has some encoded files. I wasn't able to create a short reproducable script because there are a lot of dependencies and I don't know what is in the encoded file.

Additional Information

I use phpStorm client.

Attached is a xdebug.remote_log generated when stepping over the encoded function.
<- step_over -i 27 is the last entry.

After the execution terminates, it restarts second times and terminates again. I think that it could be firefox trying second request.

Current server:
OS: Fedora 22
ionCube Loader version 5.0.14 for PHP 5.6

Zend Engine v2.6.0
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.0.14
with Xdebug v2.3.3

TagsNo tags attached.
Operating SystemFedora 22
PHP Version5.5.30-5.5.34

Activities

stan

2015-08-18 05:21

reporter   ~0003160

I have just tested this on a new Ubuntu 14.04.3 server and the debugging crashes there as well.

stan

2015-08-18 11:18

reporter   ~0003162

I have installed Ubuntu 12.04.5 and the debugging has no problems with skipping over functions in ioncube encoded files. This bug seems to be affecting php versions newer than 5.3.10.

Test server:
PHP Version 5.3.10-1ubuntu3.19

Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.0.14, Copyright (c) 2002-2015, by ionCube Ltd.
with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans

stan

2015-08-18 14:01

reporter   ~0003163

I have successfully downgraded php apache module on the Fedora 22 server to version 5.4.44 and debugging is now able to skip ioncube encoded functions without crashing. However, string variables with long values in phpStorm shows as empty. But this has never worked for me. Is there a solution for it?

Current working server Fedora 22:

PHP Version 5.4.44

Zend Engine v2.4.0
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.0.14, Copyright (c) 2002-2015, by ionCube Ltd.
with Xdebug v2.3.3, Copyright (c) 2002-2015, by Derick Rethans

derick

2015-11-20 18:01

administrator   ~0003247

I am going to need reproducible case for this, otherwise there is now way I can figure out what encoded files do different. But then again, I don't really want to support closed sourced proprietary extensions either. So I guess the ball is in your court now.

stan

2015-11-20 20:32

reporter   ~0003253

It's not about supporting "closed sourced proprietary extensions". It's about being able to debug an application which contains some encoded files. I don't need to step into proprietary code. I just need to be able to use the debugger (step over encrypted functions rather than crashing the debugger).

Magento is an open source ecommerce platform, however it allows to install extensions which often has some ioncube encoded files. With this bug, xdebug is useless for me.

Unfortunately I don't have a server with php newer than 5.4.44, which is affected by this bug. I have downgraded my server to CentOS 6 with php 5.4.45. The debugging works there.

derick

2015-12-15 18:45

administrator   ~0003349

I still need a reproducible case for this one.

derick

2016-02-11 18:52

administrator   ~0003485

I can't reproduce this, and the requested feedback was not provided. I am closing this, but feel free to reopen if you can provide the requested information and the problem still occurs with Xdebug 2.4.0RC4.

stan

2016-02-12 02:10

reporter   ~0003491

I have installed PHP 5.5.32 on CentOS 6.7 and xdebug-2.4.0RC4. The debugger works on simple projects. But when I try to debug a magento webshop, i get:

No data received
ERR_EMPTY_RESPONSE
HTTP Status: failed

The site still works with debugging turned off (no cookie). The debugging previously worked with PHP 5.4 and xdebug which came with it.

The webshop app which crashes:
Magento ver. 1.7.0.2
https://www.magentocommerce.com/download

With following magento extensions installed which contains ioncube encoded files:
https://www.unirgy.com//products/udropship/
and
https://www.magentocommerce.com/magento-connect/request-for-quotation.html

Not sure which of them is causing the error, but probably the unirgy extension.

Magento is free but the extensions are paid and expensive, so I don't expect you to install them. It's just for your information.

stan

2016-02-12 02:11

reporter   ~0003492

The debugging didn't work as well with xdebug version which came with PHP 5.5.32.

stan

2016-02-12 08:41

reporter   ~0003493

One thing you could do is ask Udropship to send you the extension for free. I believe that they would do it if you would contact their developers, not sales persons.

Unirgy1

2016-07-27 18:52

reporter   ~0003658

Last edited: 2016-07-27 18:53

I've uploaded test-encoded.php and its source test.php

Please let me know if you want any specific code encoded.

This file should work with encoders on PHP 5.6 or 7.0

Thanks

derick

2021-03-17 09:26

administrator   ~0005746

Is this issue still relevant to you?