简体   繁体   中英

XDebug is not present in phpinfo on Ubuntu 11.10

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.

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...

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM