【问题标题】:xdebug installation not workingxdebug 安装不工作
【发布时间】:2011-09-05 03:43:45
【问题描述】:

所以我在 php.ini 中添加了以下行:

zend_extension="Z:\wamp2\bin\php\php5.3.0\ext\php_xdebug.dll"
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000

xdebug 确实位于具有该文件名的目录中

我设置report_zend_debug = 0

重启 wamp 等

但是 xdebug 仍然没有出现在 phpinfo....

apache 错误日志显示如下:

PHP Warning:  PHP Startup: Unable to load dynamic library 'Z:/wamp2/bin/php/php5.3.0/ext/php_imagick_ts.dll' - The specified module could not be found.\r\n in Unknown on line 0
[Mon May 30 19:07:42 2011] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations
[Mon May 30 19:07:42 2011] [notice] Server built: Dec 10 2008 00:10:06
[Mon May 30 19:07:42 2011] [notice] Parent: Created child process 4260
Failed loading Z:\wamp2\bin\php\php5.3.0\ext\php_xdebug.dll
PHP Warning:  PHP Startup: Unable to load dynamic library 'Z:/wamp2/bin/php/php5.3.0/ext/php_imagick_ts.dll' - The specified module could not be found.\r\n in Unknown on line 0
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library 'Z:/wamp2/bin/php/php5.3.0/ext/php_imagick_ts.dll' - The specified module could not be found.
 in <b>Unknown</b> on line <b>0</b><br />
[Mon May 30 19:07:43 2011] [notice] Child 4260: Child process is running
[Mon May 30 19:07:43 2011] [notice] Child 4260: Acquired the start mutex.
[Mon May 30 19:07:43 2011] [notice] Child 4260: Starting 64 worker threads.
[Mon May 30 19:07:43 2011] [notice] Child 4260: Starting thread to listen on port 80.

PHP 是 5.3.0 版

获得Xdebug 2.1.1 PHP 5.3 VC9(32位)版本

【问题讨论】:

  • 对于初学者,我会禁用 ImageMagick 扩展,因为它似乎不可用
  • 我不认为它在这里直接相关,但我发现zend_extension 并不默认为extension_dir,而是与您的php 安装相关。所以如果设置相对路径你需要ext/php_xdebug-2.x.x-5.x-vc9.dll,例如,你必须添加ext/部分。

标签: php apache installation wamp xdebug


【解决方案1】:

如果您使用 PHP 作为 Apache 模块,则需要获取 xdebug TS(线程安全)。 如果您使用 PHP 作为 CGI 进程,则需要获取 xdebug (NTS - Not Thread Safe)。

您还需要匹配构建:

PHP 5.3 VC6 将需要 xdebug VC6

PHP 5.3 VC9 将需要 xdebug VC9

请注意,您的 PHP 版本 5.3.0 非常旧,可能有过时的 API 调用,并且通常不稳定/充满错误。获取最新版本:5.3.6。或者使用默认带有匹配 xdebug 版本的 wamp 包。

这是我的行,一旦取消注释将加载 xdebug:

[XDebug]
zend_extension = "D:\WampDeveloper\Components\Php\ext\php_xdebug.dll"
xdebug.profiler_enable = 1
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "D:/WampDeveloper/Temp/xdebug"
xdebug.trace_output_dir = "D:/WampDeveloper/Temp/xdebug"

【讨论】:

    【解决方案2】:

    我刚刚发现我必须写一个扩展的完整路径,比如

    zend_extension = \usr\local\php5\ext\php_xdebug-2.2.0-5.4-vc9.dll
    

    否则我会出错。

    【讨论】:

      【解决方案3】:

      只需将完整路径写入php.ini

      zend_extension="C:\php\ext\php_xdebug.dll"
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2019-08-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-11-28
        • 2021-06-15
        • 2016-07-06
        相关资源
        最近更新 更多