【问题标题】:Xdebug and FastCGI on Apache ServerApache 服务器上的 Xdebug 和 FastCGI
【发布时间】:2014-11-07 21:45:13
【问题描述】:

我正在尝试在我的远程开发站点上安装 Xdebug。 我的 php.ini 文件中有以下内容:

xdebug.remote_enable = On
xdebug.remote_handler = dbgp
xdebug.remote_connect_back=On
xdebug.remote_port = 9001

我已将端口设置为 9001,因为我知道默认 (9000) 会与 FastCGI 冲突。

但这不起作用。通过这些设置,我得到内部错误并记录以下内容:

[Fri Nov 07 15:37:53 2014] [warn] [client 162.201.236.210] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Fri Nov 07 15:37:53 2014] [error] [client 162.201.236.210] Premature end of script headers: index.php

更新:我尝试更改 FcgidBusyTimeout,但没有帮助。

我错过了什么? 谢谢

【问题讨论】:

    标签: php apache xdebug fastcgi


    【解决方案1】:

    您必须将 CDebug 设置为自动接受连接、根据请求自动启动并设置正确的服务器 IP。

    您还在调试客户端和 XDebug 实例之间设置了预共享密钥。

    xdebug.remote_enable=1
    xdebug.remote_autostart=1
    xdebug.remote_host="127.0.0.1"
    xdebug.remote_port=9001
    xdebug.idekey="my_key"
    

    【讨论】:

    • 好的,我会在周一回去工作时尝试自动启动,但至于 idekey,我什至还没有做到这一点。这应该用 xdebug 在浏览器中加载,对吧?还是仅在 ide 使用密钥访问时才给出有效响应?这似乎不对。另外,根据xdebug.org/docs/all_settings,当remote_connect_back 为ON 时,remote_host 将被忽略。我知道这是一个安全风险,但我只是想让一些东西起作用。感谢您的帮助
    • 嘿,重新开始工作并尝试了 xdebug.remote_autostart,但它不起作用。这是我目前拥有的,但不起作用: zend_extension = /usr/lib/php/modules/xdebug.so : xdebug.remote_enable = On : xdebug.remote_autostart=On : xdebug.remote_handler = dbgp : xdebug.remote_host = myIP : xdebug.remote_port = 9001
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-02-03
    • 2017-06-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-06
    • 2014-04-17
    相关资源
    最近更新 更多