Wednesday, September 03, 2014

Install xdebug for PHP5

I am going to install xdebug, please follow the bellow instruction:

1. Run this command in terminal:
          sudo pecl install xdebug

if you face problem like:
     
      Download of "pecl/xdebug" succeeded, but it is not a valid package archive
      Error: cannot download "pecl/xdebug"



Then try by the bellow command:
                   sudo pecl install -Z xdebug

2. After the command execution end, the build process complete with this command and you will see message in the terminal like bellow:

Build process completed successfully
Installing '/usr/lib/php5/20121212+lfs/xdebug.so'
install ok: channel://pecl.php.net/xdebug-2.2.5
configuration option "php_ini" is not set to php.ini location
You should add "zend_extension=xdebug.so" to php.ini


3. Then edit php.ini by the following command:

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

    and append like  bellow:

   zend_extension = /usr/lib/php5/20121212+lfs/xdebug.so

4. Then restart apache by the bellow command:

   sudo service apache2 restart


Or you may follow the xdebug wizard instruction:

                   http://www.xdebug.org/wizard.php

No comments:

Post a Comment