2012-07-05 30 views
0

我試圖讓我的php調試器爲NetBeans在Ubuntu上工作。當我嘗試啓動調試會話時,它會嘗試永久建立連接,但最終會給我一條錯誤消息,指出沒有可用的netbeans-xdebug連接。我已經安裝了php5-xdebug,但是當我嘗試使用phpinfo()查看它時,它不顯示。我的PHP /的Apache2/php.ini中有幾行代碼:已安裝XDebug,但未顯示在phpinfo()中並且不起作用

zend_extension=/usr/lib/php5/20090626/xdebug.so 
[debug] 
; Remote settings 
xdebug.remote_autostart=off 
xdebug.remote_enable=on 
xdebug.remote_handler=dbgp 
xdebug.remote_mode=req 
xdebug.remote_host=localhost 
xdebug.remote_port=9000 
xdebug.idekey="netbeans-xdebug" 

; General 
xdebug.auto_trace=off 
xdebug.collect_includes=on 
xdebug.collect_params=off 
xdebug.collect_return=off 
xdebug.default_enable=on 
xdebug.extended_info=1 
xdebug.manual_url=http://www.php.net 
xdebug.show_local_vars=0 
xdebug.show_mem_delta=0 
xdebug.max_nesting_level=100 
;xdebug.idekey= 

; Trace options 
xdebug.trace_format=0 
xdebug.trace_output_dir=/tmp 
xdebug.trace_options=0 
xdebug.trace_output_name=crc32 

; Profiling 
xdebug.profiler_append=0 
xdebug.profiler_enable=0 
xdebug.profiler_enable_trigger=0 
xdebug.profiler_output_dir=/tmp 
xdebug.profiler_output_name=crc32 

正如你所看到的,我試圖解決它自己,但我不能得到它的工作。任何幫助將不勝感激......

+0

請,任何人 叫@ /var/www/testxdebug.php:8 ... – 2012-07-05 09:26:24

+0

你確定這個文件在那條路上嗎? – fedmich 2012-07-05 09:33:02

+0

是的,檢查,以及它在那裏... – 2012-07-05 09:38:33

回答

0

我猜你已經編輯了錯誤的php.ini

我不如果是在你的機器的情況下,至少在我,有四個目錄在/ etc/php5 /文件夾中:/ apache2,/ apache2fiter,/ cli;有時你需要編輯php.ini文件/ apache2filter文件夾下激活Xdebug的〜希望工程

3

找出第一個從那裏你的php.ini是在Ubuntu流動的命令行調用:

php -i |grep "php.ini" 

您可以測試的XDebug它正在與一個PHP文件如下因素代碼:

<?php 
function test(){ 
    echo "Called @ ".xdebug_call_file(). 
    ":".xdebug_call_line()." from". 
    xdebug_call_function(); 
} 
test(); 

>

和運行這樣的腳本: PHP -e myphpfile.php

你會得到這樣的:從{}主根@ Magento的b

好運

相關問題