所以我将以下行添加到php.ini:
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位)版本
答案 0 :(得分:7)
如果您使用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包。
以下是我的线路,一旦解开,将加载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"
答案 1 :(得分:2)
我刚刚发现我必须写一个完整的扩展路径,比如
zend_extension = \usr\local\php5\ext\php_xdebug-2.2.0-5.4-vc9.dll
否则我有错误。
答案 2 :(得分:1)
只需在php.ini
zend_extension="C:\php\ext\php_xdebug.dll"