chris@chris-laptop:~$ sudo pecl install xdebug
[sudo] password for chris:
downloading xdebug-2.0.2.tgz ...
Starting to download xdebug-2.0.2.tgz (279,621 bytes)
..................done: 279,621 bytes
65 source files, building
running: phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
At this point, you will see the same kinda output as you would expect to see from a ./configure; make; make install.
At the end of the process, you will see the installation complete with some recommended configuration changes required to get things started. This should look like the following:
Build process completed successfully
Installing '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so'
install ok: channel://pecl.php.net/xdebug-2.0.2
configuration option "php_ini" is not set to php.ini location
You should add "extension=xdebug.so" to php.ini
At this point, you should open your php.ini file an add the line as suggested, but use the zend_extension directive as follows:
zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so
Of course you should check that the path matches what your installer output provides.
And then you just need to restart apache and you're done.
To check that your installation is working, try running the following code (which is similar to one of the test scripts on the xdebug site):
<?php
function test(){
echo "Called @ ".xdebug_call_file().
":".xdebug_call_line()." from".
xdebug_call_function();
}
test();
?>
And then you can test this just by running it:
chris@chris-laptop:~/junk$ php -e xdebug.php
Called @ /home/chris/junk/xdebug.php:8 from{main}chris@chris-laptop:~/junk$
You now have all the xdebug function calls working.
christo