2011-05-31 146 views
1

,所以我增加了以下線爲php.ini:Xdebug的安裝工作不

zend_extension="Z:\wamp2\bin\php\php5.3.0\ext\php_xdebug.dll" 
xdebug.remote_enable=on 
xdebug.remote_handler=dbgp 
xdebug.remote_host=localhost 
xdebug.remote_port=9000 

Xdebug的確實位於該目錄與文件名

我設置report_zend_debug = 0

重啓WAMP等

但是xdebug仍然不會在phpinfo中顯示....

Apache的錯誤日誌中顯示以下內容:

PHP Warning: PHP Startup: Unable to load dynamic library 'Z:/wamp2/bin/php/php5.3.0/ext/php_imagick_ts.dll' - The specified module could not be found.\r\n in Unknown on line 0 
[Mon May 30 19:07:42 2011] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations 
[Mon May 30 19:07:42 2011] [notice] Server built: Dec 10 2008 00:10:06 
[Mon May 30 19:07:42 2011] [notice] Parent: Created child process 4260 
Failed loading Z:\wamp2\bin\php\php5.3.0\ext\php_xdebug.dll 
PHP Warning: PHP Startup: Unable to load dynamic library 'Z:/wamp2/bin/php/php5.3.0/ext/php_imagick_ts.dll' - The specified module could not be found.\r\n in Unknown on line 0 
<br /> 
<b>Warning</b>: PHP Startup: Unable to load dynamic library 'Z:/wamp2/bin/php/php5.3.0/ext/php_imagick_ts.dll' - The specified module could not be found. 
in <b>Unknown</b> on line <b>0</b><br /> 
[Mon May 30 19:07:43 2011] [notice] Child 4260: Child process is running 
[Mon May 30 19:07:43 2011] [notice] Child 4260: Acquired the start mutex. 
[Mon May 30 19:07:43 2011] [notice] Child 4260: Starting 64 worker threads. 
[Mon May 30 19:07:43 2011] [notice] Child 4260: Starting thread to listen on port 80. 

PHP版本爲5.3.0

得到了Xdebug的2.1.1 PHP 5.3 VC9(32位)版本

+1

對於初學者的完整路徑,我會禁用ImageMagick的延伸,因爲它不顯示爲可用 – Phil 2011-05-31 02:16:43

+0

我不認爲這涉及直接在這裏,但我發現'zend_extension'不會默認爲'extension_dir',而是相對於你的PHP安裝。因此,如果設置相對路徑,您需要'ext/php_xdebug-2.x.x-5.x-vc9.dll',例如,您必須在'ext /'部分添加。 – contrebis 2012-05-21 11:04:53

回答

6

如果你使用PHP作爲Apache模塊,你需要獲得xdebug TS(線程安全)。 如果您使用PHP作爲CGI進程,則需要獲取xdebug(NTS - 非線程安全)。

您還需要匹配該版本:

PHP 5.3 VC6需要Xdebug的VC6

PHP 5.3 VC9需要Xdebug的VC9

請注意,您的PHP版本5.3.0已經很老了,可能有過時的API調用,並且通常不穩定/充滿了錯誤。獲取最新版本:5.3.6。或者默認使用一個與xdebug版本匹配的wamp包。

下面是我的線,一旦uncommened將加載的XDebug:

[XDebug] 
zend_extension = "D:\WampDeveloper\Components\Php\ext\php_xdebug.dll" 
xdebug.profiler_enable = 1 
xdebug.profiler_output_name = cachegrind.out.%t.%p 
xdebug.profiler_output_dir = "D:/WampDeveloper/Temp/xdebug" 
xdebug.trace_output_dir = "D:/WampDeveloper/Temp/xdebug" 
2

我剛剛發現,我必須寫一個完整路徑延伸,像

zend_extension = \usr\local\php5\ext\php_xdebug-2.2.0-5.4-vc9.dll 

否則我有一個錯誤。

1

只是寫在php.ini

zend_extension="C:\php\ext\php_xdebug.dll"