php - 安装 Xdebug 时丢失 Xdebug.ini 文件

标签 php ubuntu xdebug lampp

我不小心丢失了 /etc/php5/conf.d 文件夹中的 xdebug.ini 文件。当我尝试使用 apt-get 安装 xdebug 时,如何取回它,它给出如下注释。

Not replacing deleted config file /etc/php5/conf.d/xdebug.ini

我在谷歌搜索这个,我只能找到一个有用的回复。我不明白该怎么做,所以我也将其粘贴在这里,所以请建议我如何继续。

I lost my xdebug.ini file on my ubuntu slice. What happened was that I had accidentally installed xdebug via apt-get as well as pecl. I was removing the pecl installation, which also removed the ini file. I then tried reinstalling through apt-get, but i get the message: 

Setting up php5-xdebug (2.0.3-1) ...
Not replacing deleted config file /etc/php5/conf.d/xdebug.ini

Aaaaaarghhhh!! How do I get back my ini file??? anyone have a clue?
rubing January 2009
I just fixed this by purging xdebug using dpkg with the -P flag. And then reinstalling with apt-get. No worries!

Ah geez, it looks the whole file is just a link to the module:

zend_extension=/usr/lib/php5/20060613/xdebug.so

最佳答案

您删除的文件 (/etc/php5/conf.d/xdebug.ini) 仅包含以下行:

zend_extension=/usr/lib/php5/20060613/xdebug.so

尽管路径可能与旧 PHP 版本的路径不同 - 检查/usr/lib/php5 下的目录名称并使用它。

@tetet 已经提供了替代选项。

关于php - 安装 Xdebug 时丢失 Xdebug.ini 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16785211/

相关文章:

php 日期格式从 d/m/Y 转换为 date ('D, j M Y H:i:s' )

php - MySQL - 嵌套where条件

linux - 我应该在 Windows 或 Docker 命令行上运行 Docker 命令吗?

php - Xdebug远程调试可变字符串长度

macos - 无法加载 Xdebug,因为 PHP 是使用 API NTS debug 构建的

javascript - 将值从 jquery 解析为 php 并 chop mysql 表

mysql - 在 Ubuntu 终端中使用 join 运行 MYSQL 选择查询

ubuntu - 如何从桌面隐藏启动器?

php - 如何在 Ubuntu 16.04 上设置 Docker + PhpStorm + xdebug

php - 通过 PHP 从交换 Web 服务获取未读邮件