Mediawiki debugging

From Biowikifarm Metawiki
Revision as of 15:38, 10 March 2011 by Andreas Plank (Talk | contribs) (+Category)

Jump to: navigation, search

Installing xdebug

With xdebug it is possible to get detailed debugging information from parsed php scripts if the slightest error message is reported by php, i.e. error notice. Install it as follows:

# install xdebug
sudo pecl install xdebug

This downloads and compiles xdebug and creates some output/version messages. To activate xdebug, you finally have to add the following link path in the php.ini file and restart the apache server gracefully:

# edit php.ini with nano
sudo nano /etc/php5/apache2/php.ini
; xdebug extension (installed Mon Mar  7 23:38:32 CET 2011)
zend_extension= "/path/to/lib/xdebug.so"
# let apache read the php.ini anew:
sudo /usr/sbin/apache2ctl -k graceful

Now with each notice error message a detailed debugging information is given.

Uninstalling xdebug

(1) Remove the linked xdebug.so library path in php.ini:

sudo nano /etc/php5/apache2/php.ini
; remove/comment out in /etc/php5/apache2/php.ini
; zend_extension= "/path/to/lib/xdebug.so"
# let apache read the php.ini anew:
sudo /usr/sbin/apache2ctl -k graceful

(2) The uninstall works the same way as the install does:

# uninstall xdebug
sudo pecl install xdebug