Adam Fisher Adam Fisher - 14 days ago 5
PHP Question

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

Answer

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
Comments