Installing PHPUnit & xDebug on NetBeans, Ubuntu


1 : you have to install php5 & apache2 and the module


sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart

2 : Install pear if it was not installed


sudo apt-get install php5-pear

3 :  Install PHPUnit :-


sudo apt-get remove phpunit
sudo pear channel-discover pear.phpunit.de
sudo pear channel-discover pear.symfony-project.com
sudo pear channel-discover components.ez.no
sudo pear update-channels
sudo pear upgrade-all
sudo pear install --alldeps phpunit/PHPUnit
sudo apt-get install phpunit

4 : Install xdebug:-


sudo apt-get install php5-xdebug

5 : find the xdebug.xo file location.


sudo find / -name 'xdebug.so'

6 : Copy the location retrieved from the terminal

7 : open the following file


sudo gedit  /etc/php5/cli/conf.d/xdebug.ini

8 : modify the line as follows with the location retrived from Step 6


zend_extension="/usr/lib/php5/20060613+lfs/xdebug.so"

9 : Repeat step Seven for the following file


sudo gedit /etc/php5/apache2/php.ini

10 : Add the following line anywhere and use also the location retrieved from Step 6


zend_extension="/usr/lib/php5/20060613+lfs/xdebug.so"

Finally : Check that xdebug was installed successfully


php -v

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: