简体   繁体   English

在IIS 7上将xdebug作为Zend扩展加载

[英]Loading xdebug as a Zend Extension on IIS 7

I have PHP 7.0.0 on IIS 7, Windows 10 and FastCGI all installed via the web platform installer. 我在IIS 7,Windows 10和FastCGI上都有PHP 7.0.0,都是通过网络平台安装程序安装的。 I am attempting to install xdebug by pasting my phpinfo() into the wizard and follow the instructions. 我正在尝试通过将phpinfo()粘贴到向导中并按照说明来安装xdebug。

The problem is I am unable to configure it as a zend_extenson. 问题是我无法将其配置为zend_extenson。 When I go into PHP Manager in IIS and enable the xdebug extension, I get the following lines inserted into the php.ini file: 当我进入IIS中的PHP Manager并启用xdebug扩展名时,我将以下行插入到php.ini文件中:

[PHP_XDEBUG-2.5.0RC1-7.0-VC14-NTS-X86_64]
extension=php_xdebug-2.5.0rc1-7.0-vc14-nts-x86_64.dll

If I change the line to be zend_extension instead and refresh the extensions listed in the PHP Extensions screen of IIS, it will show as disabled again. 如果我将行更改为zend_extension并刷新IIS的“ PHP扩展”屏幕中列出的扩展,它将再次显示为已禁用。 If I enable it again, it will go back to what you see above. 如果我再次启用它,它将返回到您在上面看到的内容。 IIS does not like zend_extension=. IIS不喜欢zend_extension =。 What am I missing? 我想念什么?

I also see the following in the PHP log file: 我还在PHP日志文件中看到以下内容:

PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0 PHP警告:Xdebug必须在第0行的Unknown中作为Zend扩展加载

It turns out I had to downgrade xdebug to 2.4.1 and the connection showed up in PHP Storm. 事实证明,我不得不将xdebug降级到2.4.1,并且连接显示在PHP Storm中。 I also used the following settings in my php.ini file. 我还在php.ini文件中使用了以下设置。 The extension will not show as enabled in the IIS PHP Manager but it actually is enabled as verified on the phpinfo() page. 该扩展名不会在IIS PHP管理器中显示为已启用,但实际上已在phpinfo()页面上验证为已启用。

[PHP_XDEBUG]
zend_extension=php_xdebug.dll
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.idekey=PHPSTORM

No need to downgrade simply replace, 无需降级,只需更换,

extension=php_xdebug.dll

with

zend_extension=php_xdebug.dll

verified to be working with Xdebug version 2.6.1 iis 7 验证可与Xdebug版本2.6.1 iis 7一起使用

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

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