Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php xdebug已成功安装在linux上,但不工作_Php_Linux_Xdebug - Fatal编程技术网

Php xdebug已成功安装在linux上,但不工作

Php xdebug已成功安装在linux上,但不工作,php,linux,xdebug,Php,Linux,Xdebug,我已经在我的Linux系统上安装并配置了Xdebug,但是,尽管启用了PHPinfo,但在我的PHPinfo文件中看不到“Xdebug”,当我将PHPinfo源代码页放入Xdebug向导时,显示:Xdebug已安装:否 你对如何解决这个问题有什么想法吗 php -v PHP 7.4.3 (cli) (built: Oct 6 2020 15:47:56) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c)

我已经在我的Linux系统上安装并配置了Xdebug,但是,尽管启用了PHPinfo,但在我的PHPinfo文件中看不到“Xdebug”,当我将PHPinfo源代码页放入Xdebug向导时,显示:Xdebug已安装:否

你对如何解决这个问题有什么想法吗

php -v

PHP 7.4.3 (cli) (built: Oct  6 2020 15:47:56) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies
with Xdebug v2.9.2, Copyright (c) 2002-2020, by Derick Rethans

另外,我在php.ini文件的末尾添加了以下行:

zend_extension = /opt/lampp/lib/php/extensions/no-debug-non-zts-20200930/xdebug.so

xdebug.mode = debug
xdebug.start_with_request = yes
xdebug.client_port = 9000

关于要编辑的正确文件的更多信息,我准确地编辑了这个文件,目录如下图所示:


我试图用PHPv7.4安装xdebug v3,但它在我的系统中安装不正确

在这段视频中,我将我的PHP版本更新为8,然后再试一次,我的问题现在解决了:)


命令行PHP和web服务器PHP通常使用不同的配置文件。查看phpinfo()的输出,查看web服务器从何处加载其配置文件,并确保您也编辑了该文件。加载的配置文件:/opt/lampp/etc/php.ini,我准确地编辑了该文件!您重新启动web服务器了吗?请确保在opcache include之后有xdebug.so include。1)顺便说一句:您使用xdebug v2.9.2进行了
,但随后使用
xdebug.start\u with\u request=yes
config。。这是Xdebug v3(该选项在v2中不起任何作用)。2) 在CLI(终端)中执行的
php--ini
有什么好处?3) 请显示通过浏览器捕获的
phpinfo()
输出的整个顶部表格。4) 重新启动整个计算机/操作系统(以防由于某种原因无法应用某些内容)5)请检查PHP的错误日志,以获取可能的错误消息