1.http://xdebug.org/wizard.php
访问地址,然后把php.ini的信息html放到文本里面提交
刷新后就会出现详细的安装信息
Tailored Installation Instructions
Summary
- Xdebug installed: no
- Server API: FPM/FastCGI
- Windows: no
- Zend Server: no
- PHP Version: 5.4.34
- Zend API nr: 220100525
- PHP API nr: 20100525
- Debug Build: no
- Thread Safe Build: no
- Configuration File Path: /etc
- Configuration File: /etc/php.ini
- Extensions directory: /usr/local/php/lib/php/extensions/no-debug-non-zts-20100525
Instructions
- Download xdebug-2.3.3.tgz
- Unpack the downloaded file with
tar -xvzf xdebug-2.3.3.tgz
- Run:
cd xdebug-2.3.3
-
Run:
phpize
(See the FAQ if you don't havephpize
.As part of its output it should show:
Configuring for: ... Zend Module Api No: 20100525 Zend Extension Api No: 220100525
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/local/php/lib/php/extensions/no-debug-non-zts-20100525
- Edit
/etc/php.ini
and add the line
zend_extension = /usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so
- Restart the webserver
下载文件
tar -xvzf xdebug-2.3.3.tgz cd xdebug-2.3.3 /usr/local/php/bin/phpize ./configure --enable-xdebug --with-php-config=/usr/local/php/bin/php-config make cp modules/xdebug.so /usr/local/php/lib/php/extensions/no-debug-non-zts-20100525
vim /etc/php.ini
加入:
zend_extension = /usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so
保存退出
/etc/init.d/php-fpm restart
然后就可以开始使用xdebug了