top
logo


Home LAMP Other Installing XDebug on XAMPP

Installing XDebug on XAMPP

PDF Print E-mail
(2 votes, average 5.00 out of 5)
Written by Alex Balyuk   
Sunday, 05 September 2010 03:14

XAMPP XAMPP is extremely popular all-in-one web server. It makes a extremely easy for developers to setup development, testing and staging servers in literally minutes. One of the things that I missed was XDebugXDebug on XAMPP. Somethings code gets really complex and step through it and see how it behaves is needed. Below you will find an easy instructions on how to install XDebug on XAMPP under Linux without downloading and compiling XDebug sources. 

In this example I am using XAMPP-1.7.1 (because of PHP 5.2) on CentOS 5.

 

Prerequisites 

First of all you need to make sure you have all the necessary software. Run the terminal and execute the following command, you will need root privileges. If you are using debian distribution of linux, instead of yum use apt-get.

yum -y install m4 autoconf

Download and install desired version of XAMPPDownload and install desired version of XAMPP. If you need PHP 5.2 download XAMPP-1.7.1, all later versions use PHP 5.3.

Download development package for XAMPP, extract it to the current XAMPP directory. My XAMPP is located in the /opt/ directory, so I extract the devel package in the same location.

 
tar xzfv /root/Downloads/xampp-linux-devel-1.7.1.tar.gz -C /opt/
 

 

Installation

  1. We need to update PECL channels database on current machine. Run the following command
    /opt/lampp/bin/pecl update-channels
  2. To install xdebug execute the following
    /opt/lampp/bin/pecl install Xdebug
  3. xdebug.so gets created in /opt/lampp/lib/php/extensions/ directory
  4. Open php.ini and add the line at the end of file. Make sure to specify you /path/to/xdebug/, it was displayed during the installation.
    zend_extension="/opt/lampp/lib/php/extensions/path/to/xdebug.so"

    In my case php.ini is located in /opt/lampp/etc/php.ini, therefore I added the following lines to php.ini 
    [X-Debug]
    zend_extension="/opt/lampp/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so"
    
  5. Restart XAMPP and check phpinfo(). You should see something like this
xampp-phpinfo-xdebug
Last Updated on Sunday, 05 September 2010 03:56
 

Comments 

 
0 #1 Jay G. 2010-11-22 17:02
Worked like a charm. Thx
Quote
 

Add comment


Security code
Refresh



Copyright © 2012 (bool) cast.com. All Rights Reserved.
Joomla!Joomla! is Free Software released under the GNU/GPL License.GNU/GPL License.

bottom
top
Site Map | Contact Us

bottom