Xdebug下载:登录到官网向导页面 http://xdebug.org/wizard.php
把 phpinfo 函数产生的页面信息拷贝到分析输入框中,点击分析按钮,它会自动分析所需要下载的Xdebug版本文件
Tailored Installation Instructions
Summary
- Xdebug installed: no
- Server API: Apache 2.0 Handler
- Windows: no
- Zend Server: no
- PHP Version: 5.5.9-1
- Zend API nr: 220121212
- PHP API nr: 20121212
- Debug Build: no
- Thread Safe Build: no
- Configuration File Path: /etc/php5/apache2
- Configuration File: /etc/php5/apache2/php.ini
- Extensions directory: /usr/lib/php5/20121212
Instructions
- Download xdebug-2.2.5.tgz
- Unpack the downloaded file with
tar -xvzf xdebug-2.2.5.tgz
- Run:
cd xdebug-2.2.5
-
Run:
phpize
(See the FAQ if you don't havephpize
.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 entryand skip the next step. - Run:
./configure
- Run:
make
- Run:
cp modules/xdebug.so /usr/lib/php5/20121212
- Edit
/etc/php5/apache2/php.ini
and add the line
zend_extension = /usr/lib/php5/20121212/xdebug.so
- Restart the webserver