Page 1 of 1

xampp 1.8.1 Xdebug Linux

PostPosted: 08. February 2013 14:40
by ed4becky
I have used Xampp for many a year, but on Windows. Now I am trying to use it on a Linux box. But Xdebug is gone!?

I need it to interface with Netbeans. How do I install it? (I don't want to build XDebug from scratch)

Re: xampp 1.8.1 Xdebug Linux

PostPosted: 10. February 2013 20:00
by JonB
OK - There may be soem good news, but a tiny bit of explaining should be done.

Xdebug is a Zend technology and they are PHP on Windows specialists. I don't think Xdebug was ever in the XAMPP-Linux/lampp distribution.

However - you may be able to install it via PECL or compile from source.

http://xdebug.org/docs/install

bear in mind that XAMPP/lampp files are not in the same locations as standard LAMP builds and that Linux is unaware lampp is installed (that is its beauty and its weakness)

Good Luck
8)

Re: xampp 1.8.1 Xdebug Linux

PostPosted: 10. February 2013 20:17
by Altrea
JonB wrote:Xdebug is a Zend technology and they are PHP on Windows specialists.

I don't think that's true. XDebug was written by Derick Rethans, a well known PHP evangelist (XDebug, OpenStreetmap, MongoDB PHP driver) and he is not related to Zend Technologies Ltd.
XDebug just uses the zend_extension interface to be included in the Zend Engine itself, but other tools use this interface too (Ioncube loader for example).

Just for clarification :D

Re: xampp 1.8.1 Xdebug Linux

PostPosted: 11. February 2013 16:38
by JonB
OK - I accept that. You certainly know more than I about PHP.

However - bearing on the OP's question - what is the simplest way to get it (Xdebug) to work with XAMPP/lampp???

Re: xampp 1.8.1 Xdebug Linux

PostPosted: 11. February 2013 16:46
by Altrea
JonB wrote:what is the simplest way to get it (Xdebug) to work with XAMPP/lampp???

um... I don't use XAMPP nor XDebug on my CentOS machines, but if i read the http://xdebug.org/docs/install correct, i would say via PECL/PEAR?
I really don't know :shock: Maybe i should try it out later at home if i get some minutes alone with my machines :D

Re: xampp 1.8.1 Xdebug Linux

PostPosted: 13. February 2013 03:36
by Altrea
Okay... much more complicated than expected :D
I am not a Linux guru and my CentOS machine was as clean as possible, so maybe some steps are not necessary:

  • download the XAMPP development package from here
  • open your terminal
  • execute the "su" command and type in your root password
  • navigate to your downloaded XAMPP development package file
  • execute the following command to install the XAMPP development package
    Code: Select all
    tar xvfz xampp-linux-devel-1.8.1.tar.gz -C /opt
  • run the following command to install autoconf (if not already installed):
    Code: Select all
    yum install autoconf
  • run the following command to install the Development Tools for the C compiler
    Code: Select all
    yum groupinstall "Development Tools"
  • navigate to your /opt/lampp/bin/ directory
  • run the following command to install xdebug and remember (copy) at the end the path where the .so file will be installed to
    Code: Select all
    ./pecl install xdebug
  • run the following command to open your /opt/lampp/etc/php.ini file
    Code: Select all
    gedit /opt/lampp/etc/php.ini
  • at the end of this file add the following base configuration parameters
    Code: Select all
    [xdebug]
    ;here YOUR path
    zend_extension="/opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"

    xdebug.remote_enable=1
    xdebug.remote_handler=dbgp
    xdebug.remote_mode=req
    xdebug.remote_host=127.0.0.1
    xdebug.remote_port=9000
  • save the file and (re)start apache
  • check with phpinfo() if xdebug is successfully started
  • the rest is netbeans configuration

best wishes,
Altrea

Re: xampp 1.8.1 Xdebug Linux

PostPosted: 20. February 2013 21:15
by techtourist
I have installed XAMPP and xdebug via PECL. The xdebug.so file ends up in the proper directory (/opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so)
I stop and restart XAMPP, but phpinfo never shows the xdebug info.

To further complicate things, my system has apache2 installed by default. I've tried disabling php on Ubuntu and making all references to the opt/lampp install through every php-config file found on the system. I've enable remote debugging and have entered the localhost ip address.

I cannot seem to get the xdebug hook to work on the system and to be recognized by PHPStorm.

Since changing all of the config files and xdebug.ini to point to the /opt/lampp install, I now see missing .so files in the extensions directory (via PHPStorm).

I understand there are a lot of varying pieces of data to consider, but if someone knows an easy way to cleanup the whole system and get the XAMPP server configured properly, I would appreciate it. I've researched here and virtually every other place I can find to get it configured. Including threads for disabling and uninstalling the local php versions (which didn't seem to work). I tried upgrading the local php version to match the lampp version (PHP 5.4). Again, no success...

Re: xampp 1.8.1 Xdebug Linux

PostPosted: 31. May 2013 08:55
by uptoeleven
This thread walks you through it:

http://community.apachefriends.org/f/viewtopic.php?p=198067&sid=f0eaf167216e4a07a5e860cca9f7e678

haven't tried it yet but will be doing later on :)