简体   繁体   English

在PHP中安装XDebug时遇到问题

[英]Having trouble installing XDebug in PHP

I try to config XDebug on PHP. 我尝试在PHP上配置XDebug。 I download the XDebug DLL from http://xdebug.org/ . 我从http://xdebug.org/下载了XDebug DLL。 I tried every possible version, and edit the php.ini as it suggested, but when I use phpinfo() to see the xdebug info I get nothing at all. 我尝试了所有可能的版本,并按照它的建议编辑php.ini,但是当我使用phpinfo()查看xdebug信息时,我什么都没得到。 Any ideas? 有任何想法吗?

My environment is PHP 5.4 + Apache2.2 + Windows 7. 我的环境是PHP 5.4 + Apache2.2 + Windows 7。

First, follow these instructions on the xDebug site to install the module correctly (Which I think you've done!.. Use the wizard!! ). 首先,按照xDebug站点上的这些说明正确安装模块(我认为你已经完成了! 使用向导!! )。 ( http://xdebug.org/wizard.php ) http://xdebug.org/wizard.php

When you run phpinfo() , you should see the following (If installed correctly): 运行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 !!

Then, you will need to add the following to your php.ini . 然后,您需要将以下内容添加到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

Remember: After making any changes to php.ini you must restart your apache server. 记住:php.ini进行任何更改后,必须重新启动Apache服务器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM