【问题标题】:Fix JIT after install and uninstall of Xdebug安装和卸载 Xdebug 后修复 JIT
【发布时间】:2021-12-19 16:11:54
【问题描述】:

安装 Xdebug 后 JIT 不再工作:

PHP 警告:JIT 与覆盖 zend_execute_ex() 的第三方扩展不兼容。 JIT 已禁用。在第 0 行的未知中

已卸载 Xdebug 并重新安装 PHP,但我仍然收到错误消息。如何解决?

apt-get remove --purge php-xdebug

apt-get install --reinstall php8.0-fpm php8.0-apcu php8.0-imap php8.0-curl php8.0-mysql php8.0-mbstring php8.0-bcmath php8.0-xml php8.0-redis php8.0-intl php8.0-soap php8.0-ssh2

【问题讨论】:

  • 虽然这可行,但您真正需要做的就是禁用 php.ini 文件中的 xdebug 扩展名。只需在前面加上一个“;”在这条线上:zend_extension=xdebug.so

标签: php xdebug jit


【解决方案1】:

如果您仍然收到错误,那么 Xdebug(或其他扩展)仍在加载。 php -m 会告诉你加载了哪些模块,php --ini PHP 正在使用哪些 INI 文件,这可能会加载 xdebug(或其他扩展)。

【讨论】:

  • 这很奇怪php -m 列出了xdebug,即使我已经apt-get remove --purge php-xdebug
  • 我找到了ini文件,现在它可以工作了:)
  • 奇怪的是这在 PHP 8.0.0 中不是问题它开始出现在 PHP 8.0.1 及更高版本中。我刚刚使用 PHP 8.0.3 遇到了这个问题。我禁用了 Xdebug 扩展并且 JIT 工作。该错误记录在这里:https://bugs.php.net/bug.php?id=80608
  • @dougB 在 PHP 8.0.0 中它只会使 PHP 崩溃 ;-)
猜你喜欢
  • 1970-01-01
  • 2012-03-27
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-02-23
  • 2010-09-28
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多