Xdebug with XAMPP in Ubuntu 14.04

本小妞迷上赌 提交于 2019-12-05 08:19:31
Mohammed Ramadan

xdebug is located under xampp folder in

/opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so

on ubuntu 14.04 just search for it in /opt/lampp and copy the full path to it and then open php.ini and replace

;zend_extension=opcache.so

with

zend_extension="/path/xdebug.so"

in my case

zend_extension="/opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so"

edited in /opt/lmapp/etc/php.ini assigned the location of xdebug.so to zend_extension

[xdebug]
zend_extension="/usr/lib/php5/20121212/xdebug.so"

Replace with

[xdebug]
zend_extension="xdebug.so"

and restart lampp and Xdebug is installed.

AS I was not doing this before because Xdebug Docs itself warn not to do this

Note: You should ignore any prompts to add "extension=xdebug.so" to php.ini — this will cause problems.

Pascal Tovohery
[xdebug]
zend_extension="xdebug.so"

Replace with

[xdebug]
zend_extension="20160603/xdebug.so"

I have installed it by:

sudo apt install php-pear

sudo pecl channel-update pecl.php.net

sudo apt install php7.2-dev

sudo pecl install xdebug

Read the last part of the output, follow, and add the corresponding zend_extension=... line to your php.ini file. Restart php-fpm (or Apache if you have it as an Apache module), and you'll have XDebug!

In my case:

open /opt/lampp/etc/php.ini

configuration option "php_ini" is not set to php.ini location You should add "zend_extension=/usr/lib/php/20170718/xdebug.so" to php.ini

sudo /opt/lampp/lampp restart

Just type the command sudo pecl install xdebug OR Install it with source code

git clone -b xdebug_2_4 --single-branch https://github.com/xdebug/xdebug/

OR

wget https://github.com/xdebug/xdebug/archive/XDEBUG_2_4_0.zip xdebug.zip && unzip xdebug.zip
cd xdebug
sudo chmod +x ./rebuild.sh && ./rebuild.sh
./configure <CONFIG>
make && sudo make install
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!