Adam
Adam

Reputation: 4780

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. I am attempting to install xdebug by pasting my phpinfo() into the wizard and follow the instructions.

The problem is I am unable to configure it as a 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:

[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. If I enable it again, it will go back to what you see above. IIS does not like zend_extension=. What am I missing?

I also see the following in the PHP log file:

PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0

Upvotes: 1

Views: 2948

Answers (2)

JonDoe
JonDoe

Reputation: 162

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

Upvotes: 1

Adam
Adam

Reputation: 4780

It turns out I had to downgrade xdebug to 2.4.1 and the connection showed up in PHP Storm. I also used the following settings in my php.ini file. The extension will not show as enabled in the IIS PHP Manager but it actually is enabled as verified on the phpinfo() page.

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

Upvotes: 3

Related Questions