首页 > 解决方案 > 20.04 升级后丢失 xdebug

问题描述

在 19.10 到 20.04 升级后,我丢失了 php7.3 xdebug。在按照https://pixelspress.com/how-to-insta...-ubuntu-19-10/ (未找到 20.04 版本)完成 php 重新安装后,我收到该错误消息:

# systemctl reload php7.3-fpm
...
Failed loading /usr/lib/php/20190902/xdebug.so: /usr/lib/php/20190902/xdebug.so: undefined symbol: zend_get_properties_for

这是我的 php7.3 安装状态:

# dpkg -l *php7.3* |grep ii
ii libapache2-mod-php7.3 7.3.24-3+ubuntu20.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
ii php7.3 7.3.24-3+ubuntu20.04.1+deb.sury.org+1 all server-side, HTML-embedded scripting language (metapackage)
ii php7.3-bcmath 7.3.24-3+ubuntu20.04.1+deb.sury.org+1 amd64 Bcmath module for PHP
ii php7.3-bz2 7.3.24-3+ubuntu20.04.1+deb.sury.org+1 amd64 bzip2 module for PHP
ii php7.3-cli 7.3.24-3+ubuntu20.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language
ii php7.3-common 7.3.24-3+ubuntu20.04.1+deb.sury.org+1 amd64 documentation, examples and common module for PHP
ii php7.3-curl 7.3.24-3+ubuntu20.04.1+deb.sury.org+1 amd64 CURL module for PHP
ii php7.3-fpm 7.3.24-3+ubuntu20.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (FPM-CGI binary)
ii php7.3-gd 7.3.24-3+ubuntu20.04.1+deb.sury.org+1 amd64 GD module for PHP
ii php7.3-imagick 3.4.4-10+ubuntu20.04.1+deb.sury.org+4 amd64 Provides a wrapper to the ImageMagick library
ii php7.3-imap 7.3.24-3+ubuntu20.04.1+deb.sury.org+1 amd64 IMAP module for PHP
ii php7.3-intl 7.3.24-3+ubuntu20.04.1+deb.sury.org+1 amd64 Internationalisation module for PHP
ii php7.3-json 7.3.24-3+ubuntu20.04.1+deb.sury.org+1 amd64 JSON module for PHP
ii php7.3-ldap 7.3.24-3+ubuntu20.04.1+deb.sury.org+1 amd64 LDAP module for PHP
ii php7.3-mbstring 7.3.24-3+ubuntu20.04.1+deb.sury.org+1 amd64 MBSTRING module for PHP
ii php7.3-mysql 7.3.24-3+ubuntu20.04.1+deb.sury.org+1 amd64 MySQL module for PHP
ii php7.3-opcache 7.3.24-3+ubuntu20.04.1+deb.sury.org+1 amd64 Zend OpCache module for PHP
ii php7.3-readline 7.3.24-3+ubuntu20.04.1+deb.sury.org+1 amd64 readline module for PHP
ii php7.3-recode 7.3.24-3+ubuntu20.04.1+deb.sury.org+1 amd64 recode module for PHP
ii php7.3-tidy 7.3.24-3+ubuntu20.04.1+deb.sury.org+1 amd64 tidy module for PHP
ii php7.3-xdebug 3.0.1+2.9.8+2.8.1+2.5.5-1+ubuntu20.04.1+deb.sury.org+1 amd64 Xdebug Module for PHP
ii php7.3-xml 7.3.24-3+ubuntu20.04.1+deb.sury.org+1 amd64 DOM, SimpleXML, WDDX, XML, and XSL module for PHP
ii php7.3-xmlrpc 7.3.24-3+ubuntu20.04.1+deb.sury.org+1 amd64 XMLRPC-EPI module for PHP
ii php7.3-zip 7.3.24-3+ubuntu20.04.1+deb.sury.org+1 amd64 Zip module for PHP

非常感谢任何帮助

标签: phpubuntuxdebug

解决方案


谢谢,我找到了 20180731,现在 xdebug 似乎可以工作,但是当我保持相同的 php 版本时,参数似乎发生了变化是否正常?

按照说明页面https://xdebug.org/docs/upgrade_guide#changed-%22xdebug.remote_host%22我以在端口 9003 上进行 localhost 调试结束(似乎现在无法更改端口默认值):

# cat /etc/php/7.3/fpm/conf.d/20-xdebug.ini 
zend_extension=/usr/lib/php/20180731/xdebug.so
xdebug.mode=debug
xdebug.start_with_request=trigger

现在它可以工作了


推荐阅读