1. Copy你的所有的phpinfo()信息到这个网站中间的空白页处:
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.6.tgz
Unpack the downloaded file with tar -xvzf xdebug-2.2.6.tgz
Run: cd xdebug-2.2.6
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/php5/20121212
Edit /etc/php5/apache2/php.ini and add the line
zend_extension = /usr/lib/php5/20121212/xdebug.so
Restart the webserver
bash: ./configure: No such file or directory
搜索网上,有的建议chmod -R 0755 x-debug,但我试过不行,试了一下chmod -R 777 x-debug,问题解决。
http://xdebug.org/wizard.php
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.6.tgz
Unpack the downloaded file with tar -xvzf xdebug-2.2.6.tgz
Run: cd xdebug-2.2.6
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/php5/20121212
Edit /etc/php5/apache2/php.ini and add the line
zend_extension = /usr/lib/php5/20121212/xdebug.so
Restart the webserver
If you like Xdebug, and thinks it saves you time and money, please have a look at the donation page.
3.按照上面的方法一步一步做就可以了。
我的情况是做到./configure这一步时出现错误提示:
sujata@sujata:~/Downloads/xdebug-2.2.6$ ./configurebash: ./configure: No such file or directory
搜索网上,有的建议chmod -R 0755 x-debug,但我试过不行,试了一下chmod -R 777 x-debug,问题解决。