为了账号安全,请及时绑定邮箱和手机立即绑定

XDebug 未在 phpinfo() 的输出中列出

XDebug 未在 phpinfo() 的输出中列出

PHP
慕姐8265434 2022-10-28 16:21:02
我正在尝试启用 XDebug,以便我可以将它与 PHPStorm 一起使用(我在 Mac 上),虽然我没有任何错误,但 XDebug 未在 phpinfo() 输出中列出。我也尝试使用 XDebug 向导,但结果相同。这是我的所有配置:我修改了/usr/local/etc/php/7.2/php.ini我从中得到的:$ php --ini:Configuration File (php.ini) Path: /usr/local/etc/php/7.2Loaded Configuration File:         /usr/local/etc/php/7.2/php.iniScan for additional .ini files in: /usr/local/etc/php/7.2/conf.dAdditional .ini files parsed:      /usr/local/etc/php/7.2/conf.d/ext-opcache.ini具有以下内容:zend_extension ="/usr/local/lib/php/pecl/20170718/xdebug.so"[xdebug]xdebug.remote_enable=1xdebug.remote_host=localhostxdebug.remote_port=9000xdebug.idekey=PHPSTORMxdebug.so使用 pecl 安装没有任何错误:$ pecl install xdebug确认我有xdebug.so:输出php -m如下:[PHP Modules]astbcmath...wddxxdebugxmlxmlreaderxmlrpcxmlwriterxslZend OPcachezipzlib[Zend Modules]XdebugZend OPcache在所有这些配置之后,我运行:$ sudo apachectl restart但在phpinfo()我没有启用它的输出中:我也查看了所有内容,但没有任何内容与xdebug.还应该注意,我在 phpinfo() 输出之前重新启动了本地服务器:$ php bin/console server:start --force我的 php 版本(您还可以看到它显示 Xdebug 已正确启用):❯ php -vPHP 7.2.27 (cli) (built: Jan 24 2020 03:49:45) ( NTS )Copyright (c) 1997-2018 The PHP GroupZend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies    with Xdebug v2.9.3, Copyright (c) 2002-2020, by Derick Rethans    with Zend OPcache v7.2.27, Copyright (c) 1999-2018, by Zend Technologies
查看完整描述

1 回答

?
肥皂起泡泡

TA贡献1829条经验 获得超6个赞

正如@LazyOne 建议的那样,我尝试重新启动系统,一切都开始正常工作。看起来需要重新启动才能开始使用新的设置/配置。因此,如果您尝试了一切并且从配置角度来看一切都很好,请尝试重新启动系统。



查看完整回答
反对 回复 2022-10-28
  • 1 回答
  • 0 关注
  • 66 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信