简体   繁体   English

Xdebug与UAMPntu 14.04中的XAMPP

[英]Xdebug with XAMPP in Ubuntu 14.04

System Configuration 系统配置

Ubuntu 14.04 Ubuntu 14.04

Xampp v 5.6.3 Xampp v 5.6.3

installed php5-dev after xampp on 在xampp之后安装了php5-dev

sudo /opt/lampp/lampp start

now want to install Xdebug wihin xampp and I tried available 3 method but nothing is working out , please see the whole process. 现在想安装Xdebug wihin xampp,我尝试了3种方法,但没有什么工作,请看整个过程。

1)Ubuntu software package 1)Ubuntu软件包

 sudo apt-get install php5-xdebug

command exceuted successfully but no such file in .usr/lib/php5/... 命令成功但在.usr / lib / php5 /中没有这样的文件...

uninstalled 卸载

2)Tailored Installation Instructions 2)量身定制的安装说明

downloaded xdebug.tar.gz after checking with wizard 向导检查后下载了xdebug.tar.gz

 ice@cold:~/Downloads/xdebug-2.2.6$ /usr/bin/phpize5 

/usr/bin/phpize5 Cannot find config.m4. / usr / bin / phpize5找不到config.m4。
Make sure that you run '/usr/bin/phpize5' in the top level source directory of the module 确保在模块的顶级源目录中运行“/ usr / bin / phpize5”

also tried with phpize , /opt/lampp/bin/phpize but not working out 还试过phpize/opt/lampp/bin/phpize但没有运作

3)PECL Installation 3)PECL安装

before that let me check with pecl help version 在此之前让我检查pecl help version

PEAR Version: 1.9.4 梨子版本:1.9.4
PHP Version: 5.5.9-1ubuntu4.5 Zend Engine Version: 2.5.0 PHP版本:5.5.9-1ubuntu4.5 Zend引擎版本:2.5.0
Running on: Linux ice-cold 3.13.0-39-generic #66-Ubuntu SMP Tue Oct 28 13:30:27 UTC 2014 x86_64 运行于:Linux冰冷3.13.0-39-通用#66-Ubuntu SMP Tue Oct 28 13:30:27 UTC 2014 x86_64

pecl install xdebug

...
...
Build process completed successfully
Installing '/usr/lib/php5/20121212/xdebug.so'
install ok: channel://pecl.php.net/xdebug-2.2.6
configuration option "php_ini" is not set to php.ini location
You should add "zend_extension=xdebug.so" to php.ini

executed completely 完全执行

I can see the file 我可以看到该文件

644 /usr/lib/php5/20121212/xdebug.so 644 /usr/lib/php5/20121212/xdebug.so

added below line in /opt/lampp/etc/ php.ini 在/ opt / lampp / etc / php.ini下面添加了一行

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

restart lampp 重启灯泡

but still xdebug icon is missing 但仍然缺少xdebug图标 截图

Please tell me what is wrong 请告诉我有什么问题

xdebug is located under xampp folder in xdebug位于xampp文件夹下

/opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so /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 在ubuntu 14.04上只需在/ opt / lampp中搜索并复制完整路径然后再打开php.ini并替换

;zend_extension=opcache.so ;的zend_extension = opcache.so

with

zend_extension="/path/xdebug.so" 的zend_extension = “/路径/ xdebug.so”

in my case 在我的情况下

zend_extension="/opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so" 的zend_extension = “/选择/ LAMPP / LIB / PHP /扩展/无调试非ZTS-20131226 / xdebug.so”

edited in /opt/lmapp/etc/php.ini assigned the location of xdebug.so to zend_extension /opt/lmapp/etc/php.ini中编辑,将xdebug.so的位置分配给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. 并重新启动lampp并安装Xdebug。

截图

AS I was not doing this before because Xdebug Docs itself warn not to do this 因为我之前没有这样做,因为Xdebug Docs本身警告不要这样做

Note: You should ignore any prompts to add "extension=xdebug.so" to php.ini — this will cause problems. 注意:您应该忽略任何提示将“extension = xdebug.so”添加到php.ini - 这将导致问题。

[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. 阅读输出的最后一部分,然后将相应的zend_extension = ...行添加到php.ini文件中。 Restart php-fpm (or Apache if you have it as an Apache module), and you'll have XDebug! 重启php-fpm(或Apache,如果你把它作为Apache模块),你就会有XDebug!

In my case: 就我而言:

open /opt/lampp/etc/php.ini 打开/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 配置选项“php_ini”未设置为php.ini位置您应该将“zend_extension = / usr / lib / php / 20170718 / xdebug.so”添加到php.ini

sudo /opt/lampp/lampp restart

Just type the command sudo pecl install xdebug OR Install it with source code 只需输入命令sudo pecl install xdebug或使用源代码安装它

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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