2013-01-04 62 views
0

我尝试在PHP上配置XDebug。我从http://xdebug.org/下载了XDebug DLL。我尝试了所有可能的版本,并按照它的建议编辑php.ini,但是当我使用phpinfo()来查看xdebug信息时,我什么也得不到。有任何想法吗?在PHP中安装XDebug时遇到困难

我的环境是PHP 5.4 + APACHE2.2 + Windows 7的

+2

你使用哪个系统? XAMPP? WAMP?或者你使用其他网络服务器? – Stony

+1

也许你正在编辑错误的php.ini?检查'phpinfo()'来查看你应该修改的路径(你可能有一个单独的CLI)。 – halfer

+1

还检查您的日志,看看是否有问题加载dll –

回答

2

首先,按照在xDebug site这些说明正确安装模块(我认为你这样做!... 使用向导! !)。 (http://xdebug.org/wizard.php

当您运行phpinfo(),你应该可以看到以下内容(如果正确安装):

This program makes use of the Zend Scripting Language Engine: 
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies 
with Xdebug v2.2.0, Copyright (c) 2002-2012, by Derick Rethans <-- !! :D !! 

然后,您需要将以下内容添加到您的php.ini

[xdebug] 
# Make sure the below path is correct and points to your 'xdebug.so' 
zend_extension="/Applications/MAMP/bin/php/php5.2.17/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so" 
xdebug.default_enable=1 
xdebug.max_nesting_level=100 
xdebug.remote_autostart=on 
xdebug.remote_enable=on 
xdebug.remote_handler=dbgp 
xdebug.remote_host=127.0.0.1 
xdebug.remote_port=9000 
xdebug.remote_mode=req 
xdebug.idekey="netbeans-xdebug" # I use netbeans IDE, so I configure this 

记住:进行任何更改php.ini您必须重新启动Apache服务器后。
当我第一次使用xdebug来帮助我重新安装它时,我写了一个小教程。

This tutorial on my site(尚未更新年龄),但可能会帮助您开始。