如何配置xdebug?
首先根据phpinfo的输出,复制到xdebug.org/wizard.php中分析环境配置。如下:
XDEBUG EXTENSION FOR PHP | DOCUMENTATION | INSTALLATION home | updates | download | documentation | contributing | license | support | issue tracker If you like Xdebug, please consider giving a donation. Or Flattr this website: Flattr this Tailored Installation Instructions Summary Xdebug installed: no Server API: Apache 2.0 Handler Windows: no Zend Server: no PHP Version: 5.5.36 Zend API nr: 220121212 PHP API nr: 20121212 Debug Build: no Thread Safe Build: no Configuration File Path: /etc Configuration File: /etc/php.ini Extensions directory: /usr/lib/php/extensions/no-debug-non-zts-20121212 object(xdebugVersion)#1 (19) { ["windows"]=> bool(false) ["debug"]=> bool(false) ["ts"]=> bool(false) ["version"]=> string(6) "5.5.36" ["zendApi"]=> string(9) "220121212" ["phpApi"]=> string(8) "20121212" ["configFile"]=> string(0) "" ["sapi"]=> string(18) "Apache 2.0 Handler" ["extensionDir"]=> string(49) "/usr/lib/php/extensions/no-debug-non-zts-20121212" ["configPath"]=> string(4) "/etc" ["xdebugVersion"]=> bool(false) ["tarDir"]=> string(15) "xdebug-2.5.0rc1" ["winCompiler"]=> int(9) ["architecture"]=> string(3) "x86" ["zendServer"]=> bool(false) ["xdebugAsPhpExt"]=> bool(false) ["xdebugAsZendExt"]=> bool(false) ["dirSep"]=> string(1) "/" ["xdebugVersionToInstall"]=> string(8) "2.5.0rc1" } Instructions Download xdebug-2.5.0rc1.tgz Unpack the downloaded file with tar -xvzf xdebug-2.5.0rc1.tgz Run: cd xdebug-2.5.0rc1 Run: phpize (See the FAQ if you don't have phpize. As part of its output it should show: Configuring for: ... Zend Module Api No: 20121212 Zend Extension Api No: 220121212 If it does not, you are using the wrong phpize. Please follow this FAQ entry and skip the next step. Run: ./configure Run: make Run: cp modules/xdebug.so /usr/lib/php/extensions/no-debug-non-zts-20121212 Create /etc/php.ini and add the line zend_extension = /usr/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so Restart the webserver