Difference between revisions of "Mediawiki debugging"

From Biowikifarm Metawiki
Jump to: navigation, search
m (+Category)
Line 6: Line 6:
 
sudo pecl install xdebug
 
sudo pecl install xdebug
 
</source>
 
</source>
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:
+
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:
 
<source lang="bash">
 
<source lang="bash">
 
# edit php.ini with nano
 
# edit php.ini with nano
Line 18: Line 18:
 
</blockquote>
 
</blockquote>
 
<source lang="bash">
 
<source lang="bash">
# let apache read the php.ini anew:
+
# let nginx/apache read the php.ini anew:
sudo /usr/sbin/apache2ctl -k graceful
+
sudo /usr/sbin/apache2ctl -k graceful && sudo service nginx restart && sudo service php5-fpm restart
 
</source>
 
</source>
 
Now with each notice error message a detailed debugging information is given.
 
Now with each notice error message a detailed debugging information is given.
Line 36: Line 36:
 
</blockquote>
 
</blockquote>
 
<source lang="bash">
 
<source lang="bash">
# let apache read the php.ini anew:
+
# let apache/nginx read the php.ini anew:
sudo /usr/sbin/apache2ctl -k graceful
+
sudo /usr/sbin/apache2ctl -k graceful && sudo service nginx restart && sudo service php5-fpm restart
 
</source>
 
</source>
 
(2) The uninstall works the same way as the install does:
 
(2) The uninstall works the same way as the install does:

Revision as of 13:49, 11 January 2013

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:

# 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 nginx/apache read the php.ini anew:
 sudo /usr/sbin/apache2ctl -k graceful && sudo service nginx restart && sudo service php5-fpm restart

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/nginx read the php.ini anew:
 sudo /usr/sbin/apache2ctl -k graceful && sudo service nginx restart && sudo service php5-fpm restart

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

# uninstall xdebug
sudo pecl install xdebug