wamp安装xdebug特殊情况win7 64位安装32位wamp

在wamp上安装xdebug网上很多文章都介绍了方法,但是我这里遇到了一个很特殊的情况,在网上很少有人提及:

我机器是win7 64位的,安装的wamp1.7.4是32位的,这是后来导致出现奇怪现象的根源。

按照网上提供的方法如下:

进入xdebug网站,选择测试phpinfo()信息,注意这里不是采用贴源码的方式,是采用贴显示出的html文字的方式。

根据测试的信息,我的信息如下:

Summary

  • Xdebug installed: no
  • Server API: Apache 2.0 Handler
  • Windows: yes - Compiler: MS VC9 - Architecture: x86
  • Zend Server: no
  • PHP Version: 5.2.5
  • Zend API nr: 220060519
  • PHP API nr: 20060613
  • Debug Build: no
  • Thread Safe Build: yes
  • Configuration File Path: C:Windows
  • Configuration File: D:wampApache2inphp.ini
  • Extensions directory: d:wampphpext

注意这里看到我们的编译器为VC9,然后我的php版本是5.2.5,而且是线程安全的因此,我就很容易去找到PHP 5.2 VC9 TS (32 bit) ,结果下载下来,按如下的配置

[Xdebug]
zend_extension_ts ="d:/wamp/php/ext/php_xdebug-2.2.3-5.2-vc9.dll"
xdebug.auto_trace=On
xdebug.collect_params=On
xdebug.collect_return=On
xdebug.trace_output_dir="d:/wamp/php/debuginfo"
xdebug.profiler_enable=On
xdebug.profiler_output_dir="d:/wamp/php/debuginfo"

结果很悲催,重启webserver后,phpinfo一闪就关闭了,尝试了64位,nts各种方式都不行,要么是phpinfo关闭,要么就是xdebug不出现。

后来很偶然,我尝试了使用vc6的编译版本,就是zend_extension_ts ="d:/wamp/php/ext/php_xdebug-2.1.2-5.2-vc6.dll",结果通过了,一下子终于明白了,

其实自己是被误导了,虽然机器是64位的,但是调用组件还是使用的vc6的版本进行编译的,至此,做个提醒,希望安装32位的注意。

原文地址:https://www.cnblogs.com/tippoint/p/3429092.html