The Xdebug extension of PHP can help you dissect your application to find out why when a program is wrong or fails. We can use Xdebug to trace call stacks, analyze memory usage, and view parameters and variables. The process of installing xdebug is relatively straightforward, as follows (Linux):
wget http://xdebug.org/link.php?url=xdebug203
tar -xvzf xdebug-2.0.3.tgz
cd xdebug-2.0.3
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make
make install
vi /usr/local/php/lib/php.ini
Which is added in php.ini:
extension= "Xdebug.so"
Xdebug.default_enable = On
Xdebug.show_exception_trace = On
Xdebug.show_local_vars = 1
Xdebug.max_nesting_level = 50
Xdebug.var_display_max_depth = 6
Xdebug.dump_once = On
Xdebug.dump_globals = On
xdebug.dump_undefined = On
Xdebug.dump.REQUEST = *
Xdebug.dump.SERVER = Request_method,request_uri,http_user_agent
/usr/local/apache/bin/apachectl stop
/usr/local/apache/bin/apachectl star
Do a test file, where the Phpinfo function look, if there is a diagram below:
It indicates that the installation is normal.