简体   繁体   English

Xdebug:警告:加载 Zend 扩展“xdebug”失败

[英]Xdebug: Warning: Failed loading Zend extension 'xdebug'

I'm having trouble installing xdebug on windows. I followed the instructions of xdebug wizard but it keeps giving me the warning我在 windows 上安装 xdebug 时遇到问题。我按照 xdebug 向导的说明进行操作,但它一直给我警告

Warning: Failed loading Zend extension 'xdebug' (tried: C:/laragon/bin/php/php-8.2.1-nts-Win32-vs16-x64/ext\xdebug (Impossibile trovare il modulo specificato), C:/laragon/bin/php/php-8.2.1-nts-Win32-vs16-x64/ext\php_xdebug.dll (Impossibile trovare il modulo specificato)) in Unknown on line 0警告:加载 Zend 扩展 'xdebug' 失败(已尝试:C:/laragon/bin/php/php-8.2.1-nts-Win32-vs16-x64/ext\xdebug(Impossibile trovare il modulo specificato),C:/laragon /bin/php/php-8.2.1-nts-Win32-vs16-x64/ext\php_xdebug.dll (Impossibile trovare il modulo specificato)) 在 Unknown on line 0

I have php 8.2.1.我有 php 8.2.1。 These are the instructions:这些是说明:

Instructions指示

  1. Download php_xdebug-3.2.0-8.2-vs16-nts-x86_64.dll下载php_xdebug-3.2.0-8.2-vs16-nts-x86_64.dll

  2. Move the downloaded file to C:\laragon\bin\php\php-8.2.1-nts-Win32-vs16-x64\ext, and rename it to php_xdebug.dll将下载的文件移动到C:\laragon\bin\php\php-8.2.1-nts-Win32-vs16-x64\ext,重命名为php_xdebug.dll

  3. Update C:\laragon\bin\php\php-8.2.1-nts-Win32-vs16-x64\php.ini and add the line:更新C:\laragon\bin\php\php-8.2.1-nts-Win32-vs16-x64\php.ini并添加以下行:
    zend_extension = xdebug

  4. Restart the Apache Webserver重启 Apache 网络服务器

I also tried changing the php version to 8.1.10 but it keeps giving me the same warning我也尝试将 php 版本更改为 8.1.10 但它一直给我同样的警告

EDIT: I used the full path编辑:我使用了完整路径

zend_extension = C:/laragon/bin/php/php-8.2.1-nts-Win32-vs16-x64/ext/php_xdebug.dll zend_extension = C:/laragon/bin/php/php-8.2.1-nts-Win32-vs16-x64/ext/php_xdebug.dll

and now give me this error现在给我这个错误

Failed loading C:/laragon/bin/php/php-8.2.1-nts-Win32-vs16-x64/ext/php_xdebug.dll加载失败 C:/laragon/bin/php/php-8.2.1-nts-Win32-vs16-x64/ext/php_xdebug.dll

There is a / the wrong way around: php-8.2.1-nts-Win32-vs16-x64/ext\php_xdebug.dll — that is either because you have an extension_dir setting that is wrong, or you used zend_extension = \xdebug or something like that.有一个/错误的解决方法: php-8.2.1-nts-Win32-vs16-x64/ext\php_xdebug.dll — 那是因为您的extension_dir设置错误,或者您使用了zend_extension = \xdebug或类似的东西。

I would recommend in this case, to use the full path in the zend_extension line:在这种情况下,我建议在zend_extension行中使用完整路径:

zend_extension = C:/laragon/bin/php/php-8.2.1-nts-Win32-vs16-x64/ext/php_xdebug.dll

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM