1

Heading

I am having an issue with setting XDebug to work with my php5; The core problem seems to be that XDebug cannot be shown in my phpinfo.

Env: Ubuntu 11.10 64 bit Apache Version Apache/2.2.22 (Unix) PHP/5.4.5

here is what i tried with xdebug.

xdebug installation: sudo apt-get install php5-xdebug then an xdebug.so is installed in the following location. /usr/lib/php5/20090626/xdebug.so

file /usr/lib/php5/20090626/xdebug.so /usr/lib/php5/20090626/xdebug.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped 

then i appended the following settings into the php.ini file being referenced by phpinfo in my apache.

[XDebug] zend_extension=/usr/lib/php5/20090626/xdebug.so ; Remote settings xdebug.remote_autostart = Off xdebug.remote_enable = On xdebug.remote_handler = dbgp xdebug.remote_mode = req xdebug.remote_host = localhost xdebug.remote_port = 9000 

BTW, i had restarted my apache server many times, but no luck, the xdebug was still not present in my php info.

please correct my steps if inappropriate and any advice and clues that can help resolve my issue would be greatly appreciated.

7
  • You can install xdebug xdebug.org/docs/install Commented Dec 23, 2013 at 5:33
  • Not sure if this really matters but when I've installed XDebug, the zend_extension line went before [xdebug] (which is also all lowercase) Commented Dec 23, 2013 at 5:37
  • Also, apt-get should have added a config file in /etc/php5/conf.d/xdebug.ini. Commented Dec 23, 2013 at 5:43
  • @NanheKumar, thanks, but according to the official install doc, the cmd "# pecl install xdebug" should be performed, on my ubuntu this command returns "pecl/xdebug is already installed and is the same as the released version 2.2.3 install failed". I believe xdebug is really installed on my machine; Commented Dec 23, 2013 at 7:17
  • @Phil, thanks, i modified my php.ini according to your suggestion, it did not work. I was wondering about your last comment with xdebug.ini....should this one be placed somewhere.... BTW, /etc/php5/conf.d/xdebug.ini only has one line: zend_extension=/usr/lib/php5/20090626/xdebug.so Commented Dec 23, 2013 at 7:25

2 Answers 2

2

I executed the following command and it worked again on an updated Ubuntu 14.10

sudo php5enmod xdebug 

Everything was right on the php5-xdebug package but the module wasn't enabled for some reason...

Sign up to request clarification or add additional context in comments.

Comments

0

i found the solution to my problem, it seems my problem has something to do with the other php installed in the same box, i rebuilt the xdebug with the php i want to use, then i let the php.ini reference the newly built xdebug.so, the problem went away, i was able to view the xdebug information in phpinfo. With "apt-get install php5-xdebug", the xdebug is compiled with the other php which i dont want to use.

I believe this information can be useful to those who have the same problem.

To troubleshoot, make sure you can find xdebug under the zend extension in the list returned by the cmd "php -m"; Try to verify the zend api version with php -i | grep 'zend', and this has to be the same as the one being used to build the xdebug.so.

I am quite sure i have seen a FAQ in the xdebug official website that is quite related to my problem.

Anyway, thanks to those who have commented on my problem, especially Phil, your last comment is a bit enlightening.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.