How to configure PHP debugging on Ubuntu 12.04 using Eclipse and XAMPP?

I have been trying to tweak this for quite some time, but I cannot get it to work properly. Done:

  • Download the latest version of xampp and transfer it to /opt/lampp
  • Installed php5-xdebug with apt-get
  • Changed implicit_flush to On in /opt/lampp/etc/php.ini
  • The following lines are added to the end of the ini file:

     [xdebug] zend_extension="/usr/lib/php5/20090626/xdebug.so" xdebug.remote_enable=1 xdebug.remote_handler="dbgp" xdebug.remote_port=9000 xdebug.remote_host="localhost" 

I definitely restarted apache, but I still don't get the xdebug section when showing phpinfo();

I think Eclipse is configured correctly, but I cannot know for sure until I get xdebug to run.

Please help, all suggestions are very welcome!

Edit:

Here is the result of phpinfo() : http://www.pasteall.org/35930

Update:

I downloaded Xampp 1.8.1 (previously xampp 1.8.0) into /opt/lampp and added the appropriate development files. I myself compiled Xdebug according to the manual at http://xdebug.org/wizard.php and installed xdebug via /opt/lampp/bin/pecl .

Now my php.ini looks like this:

 zend_extension = "/opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so" xdebug.remote_enable = 1 xdebug.remote_port = 9000 xdebug.remote_host = "localhost" xdebug.remote_handler = "dbgp" 

I do not know what to do, http://xdebug.org/wizard.php still reports that Xdebug is not installed. Could this be a resolution issue? Currently, permissions for extensions are as follows:

 -rwxr-xr-x 1 niklas niklas 88376 Sep 30 10:43 interbase.so -rwxr-xr-x 1 niklas niklas 184920 Sep 30 10:43 oci8.so -rwxr-xr-x 1 niklas niklas 118592 Sep 30 10:43 pgsql.so -rwxr-xr-x 1 niklas niklas 830886 Oct 10 15:10 xdebug.so 

Should they belong to someone else? Should I include any additional parameters in php.ini? This is my current output of phpinfo() : http://www.pasteall.org/36135

+7
source share
4 answers

Since there is no indication why it does not work, I gave up xampp and just installed a regular tube server with xdebug via apt-get . I disconnected mysql and apache2 from starting at boot time so that they would not start if I don't want them. Here is a very simple tutorial on how to enable xdebug-debugging with Eclipse: http://www.web-brainz.co.uk/Xdebug

Other answers will certainly be most suitable for other users, although they unfortunately have not fixed my problem. Thank you so much for your help!

+1
source

Individual installation instructions

Summary

Xdebug installed: no Server API: Apache 2.0 handler Windows: no Zend server: no PHP version: 5.4.4 Zend API nr: 220100525 PHP API nr: 20100525 Debugging: no Thread Safe Build: no Path to the configuration file: / opt / lampp / etc Configuration file: /opt/lampp/etc/php.ini Extensions directory: / opt / lampp / lib / php / extensions / no-debug-non-zts-20100525

Instructions

  • Download xdebug-2.2.1.tgz
  • Unzip the downloaded file using tar -xvzf xdebug-2.2.1.tgz
  • Launch: cd xdebug-2.2.1
  • Run: phpize

    As part of his conclusion, he should show:

      Configuring for:
     ...
     Zend Module Api No: 20100525
     Zend Extension Api No: 220100525
    

    If this is not the case, you are using the wrong phpize . Please follow this frequently asked question item and skip the next step.

  • Run: ./configure
  • Run: make
  • Launch: cp modules/xdebug.so /opt/lampp/lib/php/extensions/no-debug-non-zts-20100525
  • Edit /opt/lampp/etc/php.ini and add the line zend_extension = /opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so
  • Reboot the web server

http://xdebug.org/wizard.php

+1
source

See URL below. I think this helps you a lot.

http://www.edmondscommerce.co.uk/ubuntu/ubuntu-xampp-xdebug-install/

http://www.webhelp2u.com/article/install-xdebug-on-lampp

https://stackoverflow.com/questions/9640912/problems-setting-up-eclipse-with-xdebug

Read: -

Install XDebug (LAMPP OR XAMPP for Linux)

http://www.edmondscommerce.co.uk/ubuntu/ubuntu-xampp-xdebug-install/

http://www.webhelp2u.com/article/install-xdebug-on-lampp

Install XDebug on LAMPP

  • Download the latest version (XAMPP for Linux) from http://www.apachefriends.org/en/xampp-linux.html

  • Install it. To install the flashlight, remove and insert the / opt directory.

  • Download the development kit from the same site.

  • Extract it, copy and paste the "include" folder from the Development package into the / opt / lampp directory. (This package will be used to compile the XDebug source)

  • Run the command / opt / lampp / bin / pecl update-channels. this will update the channel database on your local computer.

  • Run the command / opt / lampp / bin / pecl to install Xdebug. And wait for the process to complete.

  • Now the xdebug.so file has been created in the / opt / lampp / lib / php / extensions / directory.

  • Now open the php.ini file and add the line zend_extension = "/opt/lampp/lib/php/extensions/path_to_xdebug.so". at the end of the file.

  • Restart Lampp and check whether it is enabled or not using phpinfo ();

Update my answer after your comment

See URL below. I think this helps you a lot.

Configuring Xdebug for PHP5 on Ubuntu

http://gayanhewa.info/setup-xdebug-php5-ubuntu/

+1
source
  • In the new Ubuntu 12.04 launch:

apt-get install php5-xdebug

  • Check for xdebug if installed:

php -version

it looks like this:

root @ ubuntu-SandBox: / var / www # php --version PHP 5.3.10-1ubuntu3.19 with Suhosin-Patch (cli) (built: July 2, 2015 15:05:04) Copyright (c) 1997-2012 PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies with Xdebug v2.1.0, Copyright (c) 2002-2010, Derick Rethans root @ ubunt-SandBox: / var / WWW #

  • Change your php.ini to load Xdebug run:

vi / etc / php5 / apache2 / php.ini

and add at the bottom of the file:

[Xdebug]

xdebug.remote_enable = 1

xdebug.remote_handler = "DBGp"

xdebug.remote_port = 9000

/ * This is the ip address of your PHPstorm IDE computer. * /

xdebug.remote_host = "10.70.111.11"

  • Reboot the server:

service apache2 restart

  • Your server is now ready to connect your client IDE computer.

  • Here's how to set up PHPSTORM:

Follow this JetBrain instruction https://confluence.jetbrains.com/display/PhpStorm/Validating+Your+Debugging+Configuration

or

From the Run => Web Server Debugging Check menu, and you will see something like this:

enter image description here

  • If you do not get yellow, and everything is blue, you are kind!
  • Install the xdebug helper chrome extension from here:

https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc?hl=en

  • Start a debugging session in the browser by enabling this extension by clicking on it and the error icon will turn green.

  • Then in IDE Run => Listen for php debugging connections.

  • Set a breakpoint in the source code

  • Upload your php page (webapp) and it will stop at breakpoints.

Done.

0
source

All Articles