【问题标题】:XDEBUG hangs on virtual hosting domainsXDEBUG 挂在虚拟主机域上
【发布时间】:2012-02-23 15:55:00
【问题描述】:

当我将常规 localhost/domain 与 xdebug 一起使用时,xdebug 工作正常。但是,我还在本地机器上设置了虚拟主机,所以如果我使用 xdebug 并在域上调用。 test.domain.com。 xdebug 挂起。

我确实找到了可能的线索。在我的php.ini 文件中,如果我将xdebug.remote_host=localhost 更改为xdebug.remote_host=vhost_domain_name。有用。所以我想问题是,我可以设置多个虚拟主机域供 xdebug 查找。

[编辑]

我很抱歉。我没有发布我的设置:P。没想到。

zend_extension ="/usr/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
xdebug.remote_enable=1
xdebug.profiler_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.profiler_output_dir="/tmp"

【问题讨论】:

标签: php cakephp netbeans xdebug


【解决方案1】:

不,您不能“为 xdebug 设置多个虚拟主机域以供注意”,因为连接到您的 IDE 的是 Xdebug,而不是相反。 xdebug.remote_host 值应该是运行 IDE 的机器的主机名或 IP 地址。

【讨论】:

    【解决方案2】:

    xdebug.remote_connect_back

    如果启用,xdebug.remote_host 设置将被忽略,Xdebug 将 尝试连接到发出 HTTP 请求的客户端。它检查 $_SERVER['REMOTE_ADDR'] 变量来找出要使用的 IP 地址。 请注意,没有可用的过滤器,任何可以 连接到网络服务器然后就可以开始调试了 会话,即使它们的地址与 xdebug.remote_host 不匹配。

    【讨论】:

    • xdebug.remote_connect_back 是为了确保多个开发人员可以使用相同的 Xdebug 安装/配置。它与“监听多个虚拟主机”无关,因为在 Xdebug 中没有这样的东西。
    • 是的。假设虚拟主机是“另一个开发者”。至于虚拟主机和本地主机可以“看到”对方 remote_connect_back 应该工作
    猜你喜欢
    • 1970-01-01
    • 2013-04-26
    • 2015-06-24
    • 2015-11-29
    • 2021-01-15
    • 2017-01-20
    • 2019-09-12
    • 2012-12-24
    • 2013-06-08
    相关资源
    最近更新 更多