以下步骤为使用source 包去安装xdebug软件包。
#tar xzf xdebug-2.1.0.tgz
#cd xdebug-2.1.0
#phpize
#./configure --enable-xdebug (如果提示找不到php-config ;则请用以下命令编译:./configure --enable-xdebug --with-php-config=/usr/local/php/bin/php-config)
#make && make install
#vi /etc/php.ini
增加以下行:
zend_extension=/usr/lib/php/modules/xdebug.so
把显示错误项打开:
error_reporting = E_ALL
display_errors = On
保存。
重启apache,即可。
错误提示样板:
( ! ) Fatal error: Call to undefined function ImageCreate() in /usr/local/apache/htdocs/vtigercrm/Image/Canvas/GD.php on line 169 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0024 | 285320 | {main}( ) | ../index.php:0 |
2 | 0.2108 | 11765772 | include( '/usr/local/apache/htdocs/vtigercrm/modules/Dashboard/DashboardAjax.php' ) | ../index.php:616 |
3 | 0.2109 | 11767508 | require_once( '/usr/local/apache/htdocs/vtigercrm/include/Ajax/CommonAjax.php' ) | ../DashboardAjax.php:13 |
4 | 0.2112 | 11787196 | require_once( '/usr/local/apache/htdocs/vtigercrm/modules/Dashboard/HomepageDB.php' ) | ../CommonAjax.php:12 |
5 | 0.2413 | 12713232 | render_graph( ) | ../HomepageDB.php:57 |
6 | 0.2413 | 12713924 | vertical_graph( ) | ../Entity_charts.php:681 |
7 | 0.2414 | 12716928 | Image_Canvas::factory( ) | ../vertical_bargraph.php:78 |
8 | 0.2499 | 13375740 | Image_Canvas_GD_PNG->Image_Canvas_GD_PNG( ) | ../Canvas.php:727 |
9 | 0.2499 | 13375792 | Image_Canvas_GD->Image_Canvas_GD( ) | ../PNG.php:58 |