首页 > 解决方案 > 使用 xdebug 调试 ionCube 编码的 php 文件时出现 ERR_EMPTY_RESPONSE

问题描述

当我尝试在 vagrant 中调试某些东西时,我可以单步调试代码,调试器在断点处停止并且一切看起来都很好,直到请求完成。然后我在浏览器中收到以下错误:324 ERR_EMPTY_RESPONSE. 通常的请求(没有 xdebug)可以正常工作。我还可以调试没有编码内容的简单 php 脚本(我们使用 ionCube)。

以下是一些信息:

vagrant@localdev:~$ php -v
PHP 5.6.36-1+ubuntu14.04.1+deb.sury.org+1 (cli)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v6.0.6, Copyright (c) 2002-2016, by ionCube Ltd.
    with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans

vagrant@localdev:~$ php --ini | grep -C20 'xdebug'
/etc/php/5.6/cli/conf.d/20-intl.ini,
/etc/php/5.6/cli/conf.d/20-ioncube.ini,
/etc/php/5.6/cli/conf.d/20-json.ini,
/etc/php/5.6/cli/conf.d/20-mbstring.ini,
/etc/php/5.6/cli/conf.d/20-mcrypt.ini,
/etc/php/5.6/cli/conf.d/20-mysql.ini,
/etc/php/5.6/cli/conf.d/20-mysqli.ini,
/etc/php/5.6/cli/conf.d/20-pdo_mysql.ini,
/etc/php/5.6/cli/conf.d/20-phar.ini,
/etc/php/5.6/cli/conf.d/20-posix.ini,
/etc/php/5.6/cli/conf.d/20-readline.ini,
/etc/php/5.6/cli/conf.d/20-shmop.ini,
/etc/php/5.6/cli/conf.d/20-simplexml.ini,
/etc/php/5.6/cli/conf.d/20-soap.ini,
/etc/php/5.6/cli/conf.d/20-sockets.ini,
/etc/php/5.6/cli/conf.d/20-sysvmsg.ini,
/etc/php/5.6/cli/conf.d/20-sysvsem.ini,
/etc/php/5.6/cli/conf.d/20-sysvshm.ini,
/etc/php/5.6/cli/conf.d/20-tokenizer.ini,
/etc/php/5.6/cli/conf.d/20-wddx.ini,
/etc/php/5.6/cli/conf.d/20-xdebug.ini,
/etc/php/5.6/cli/conf.d/20-xmlreader.ini,
/etc/php/5.6/cli/conf.d/20-xmlwriter.ini,
/etc/php/5.6/cli/conf.d/20-xsl.ini

vagrant@localdev:~$ cat /etc/php/5.6/cli/conf.d/20-xdebug.ini
zend_extension=xdebug.so
xdebug.remote_enable=On
xdebug.remote_host=192.168.123.1
; xdebug.remote_autostart=On
; xdebug.remote_connect_back=On
; xdebug.remote_handler="dbgp"
; xdebug.remote_port=9000
; xdebug.max_nesting_level=250
; xdebug.idekey="PHPStorm

我有与此处描述的完全相同的问题:https ://intellij-support.jetbrains.com/hc/en-us/community/posts/206368089-Xdebug-only-partially-works

最后一条评论是:

将 xdebug 升级到 2.2.1 后它对我来说很好:)

但是我已经使用了 2.5.5,我认为这个问题与 IonCube 有某种关系。

我也读过这个,但据我所知,在我的设置中,xdebug 是在 ionCube 之后加载的。

标签: phpxdebugioncube

解决方案


推荐阅读