0
我嘗試在PHP上配置XDebug。我從http://xdebug.org/下載了XDebug DLL。我嘗試了所有可能的版本,並按照它的建議編輯php.ini,但是當我使用phpinfo()
來查看xdebug信息時,我什麼也得不到。有任何想法嗎?在PHP中安裝XDebug時遇到困難
我的環境是PHP 5.4 + APACHE2.2 + Windows 7的
我嘗試在PHP上配置XDebug。我從http://xdebug.org/下載了XDebug DLL。我嘗試了所有可能的版本,並按照它的建議編輯php.ini,但是當我使用phpinfo()
來查看xdebug信息時,我什麼也得不到。有任何想法嗎?在PHP中安裝XDebug時遇到困難
我的環境是PHP 5.4 + APACHE2.2 + Windows 7的
首先,按照在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(尚未更新年齡),但可能會幫助您開始。
你使用哪個系統? XAMPP? WAMP?或者你使用其他網絡服務器? – Stony
也許你正在編輯錯誤的php.ini?檢查'phpinfo()'來查看你應該修改的路徑(你可能有一個單獨的CLI)。 – halfer
還檢查您的日誌,看看是否有問題加載dll –