Setup xdebug on LAMPP

I am assuming the reader already has LAMPP setup and running on their Linux. First step towards setting up xdebug is to download LAMPP development package add-on from the apache-friends website. After the compressed file is download navigate to the folder where the TAR file is located using linux terminal and the type in -

export PATH=/opt/lampp/bin:$PATH

sudo tar xvfz xampp-linux-devel-1.7.4.tar.gz -C /opt

The above overwrites the existing LAMPP setup and includes the add-ons. After the files are overwritten, type in the following command.

/opt/lampp/bin/pecl update-channels

The above updates the PECL channels and prepares it for PECL based xdebug installation. After the above line is executed type-in:


/opt/lampp/bin/pecl install Xdebug

The above line sets up Xdebug in the existing LAMPP setup and at the 3rd or 4th last line of you will see the location of the xdebug.so files location given, note it down. The location may look something similar to this – “/opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so

Now we have to update the php.ini file to include the xdebug settings. You will find the file in “opt/lampp/etc/” open it by typing -

sudo gedit opt/lampp/etc/php.ini

Add the following lines at the very end of the file and save it.


zend_extension = /opt/lampp/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so
xdebug.profiler_output_dir = “/tmp/xdebug/”
xdebug.profiler_enable = On
xdebug.remote_enable=On
xdebug.remote_host=”localhost”
xdebug.remote_port=9000
xdebug.remote_handler=”dbgp”

After the file is saved restart LAMPP by typing in -

sudo opt/lampp/lampp restart

To verify goto http://localhost/ after the server is restarted and you will see Xdebug table showing the xdebug settings.

let me know if you come across any issues during the setup process.

~ thephpx

Share

My Zen-Environment for WAMP development

Hello everyone,

Every developer has there very own zen settings so do i :) . Today I am going to writing about the stuffs I use while I am at development. If you have any better alternatives or suggestions to these applications please feel free to come forward :)

My preferred application development platform includes the following -

Local Work-Station/Laptop:

Central Repository Server Applications:

  • WAMP – for basic windows, apache, mysql, php server on central repository
  • Free SMTP -  for SMTP server on the central repository
  • KpyM Telnet/SSH Server – for SSH access to my central repository
  • VisualSVN – for SVN repository server management at central repository

That is the whole host of applications that are involved in my development process which I find very helpful and agile. I work on two-stage development, my local workstation/laptop and then to my central repository where I host my SVN repositories and also live demos.

The two stage method has so far proven extreamly helpful, specially if you have a VPS account where you are at your will to install applications.

I hope this one helps you setup your zen environment :p.

take care,

- thephpx

Share