Many times I found myself trying to figure out how to work with 32 bit Xdebug on 32 bit LAMPP server on 64 bit linux. I have done exact same searches on Google over and over again in time. So I decided to mix those informations up once and not to search Google for this subject again. I assume that you already know about Xdebug and LAMPP server.
First thing to do is to install XAMPP for linux on your system. There is nice explanation about how to do this on it’s own site, so i think this won’t be a hard task for any of you geeks or nerds.
Second thing is to download and install development package for XAMPP on linux. It could be installed the same way and of course there is an explanation for that too.
So you have downloaded, installed and configured (secured) your XAMPP for linux and it’s development package. Surpirse! Development package was not needed. Really, you could done the all procedure without installing development files, but I insist on installing those files because they probably will be needed for others things you would try to do in feature.
And yet comes the tricky part. If you are using a 64bit linux system like I do, trying to compile Xdebug as 32bit extension for PHP on a 64bit compiler, don’t do it. Well, I am sure about it there is a way to do this right but my opinion is trying to this is really pain in the **s. Our trick to get Xdebug extension without compiling it is to visit this website which has remote debugging packages for Komodo IDE. You will need 32bit linux “PHP Remote Debugging” package. There is your 32bit compiled Xdebug extension, in somewhere on that package.
Next step: “cp xdebug.so /opt/lampp/lib/php/extensions”, with something like this command, copy your Xdebug extension to your php extension directory on your LAMPP install.
If you had no problems until here, then your job is nearly finished. Only thing left to do is to tell your php installation to use Xdebug as an extension. Adding these lines to your php.ini
[Xdebug]
zend_extension = "/opt/lampp/lib/php/extensions/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"
will do the work. But remember you can not use Xdebug extension with Zend Debugger together. You have to choose one of them. If your installation is configured to work with Zend Debugger, please disable it.(by commenting out the Zend Debugger extension)
That’s all and your 32bit Xdebug extension on 32bit LAMPP installation on a 64bit linux should work fine. Feel free to leave feedback.
Also if you like to compile your own Xdebug here the sites I found while i was searching over and over:
Install ‘xdebug’ PHP extension for XAMPP on linux
Getting Xdebug to work with Apache/XAMPP to debug PHP