Xdebug not loading

孤者浪人 提交于 2020-02-22 15:10:34

问题


  • Windows 7 64-bit

  • PHP 5.3.10

  • php_xdebug-2.1.4-5.3-vc9-x86_64

I got the correct download from pasting the output from phpinfo() here. This is what's in my php.ini file:

zend_extension = c:\php\ext\php_xdebug-2.1.4-5.3-vc9-x86_64.dll

I've tried with and without _ts. I've tried 32-bit and 64-bit (the wizard actually recommends the 32-bit version for some reason).

Why isn't this working?


回答1:


Have you added some basic configuration?

[xdebug]
zend_extension = "c:\php\ext\php_xdebug-2.1.4-5.3-vc9-x86_64.dll"
xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.var_display_max_depth=15



回答2:


I know I am a bit late to this party but I was wrestling with this today.

I followed the XDebug wizard's directions for the DLL install and setup the INI file correctly but it still wouldn't load.

The solution was that my xdebug.*.dll needed to be in folder I set in the INI file as the 'extension_dir'. The XDebug wizard told me to put it in the 'php/' parent directory.

Hope it helps someone.

My setup: Windows 7 x64, Apache v2.4.7 VC11, PHP v5.5.9, php_xdebug-2.2.5-5.5-vc11-x86_64.dll




回答3:


If the wizard says you need to use the 32bit version, then you need to use the 32bit version. That bit it does not get wrong. But otherwise, you're not providing enough information and you need to post the first block of phpinfo() output up for people to see.




回答4:


For people coming here from google search. Here was my setup.

  • Windows NT MY-PC 10.0 build 18362 (Windows 10) AMD64
  • MSVC15 (Visual C++ 2017)
  • php 7.2.6
  • Apache 2.4

I used the xdebug wizard to tell me which dll to download. Here is what it came up with.

  1. Download php_xdebug-2.8.0-7.2-vc15-x86_64.dll
  2. Move the downloaded file to ext
  3. Update C:\php726\php.ini and change the line

    zend_extension = ext\php_xdebug-2.8.0-7.2-vc15-x86_64.dll

  4. Restart the webserver

It definitely got the right dll but instruction didn't end up being as straight forward as it seem because when I typed php -m in powershell and it always said Failed load extension php_xdebug-2.8.0-7.2-vc15-x86_64

First of all you need to make sure if yo have extension directory set in php.ini so in my case it was extension_dir = "ext"

If the above is the case with you, just specify the dll without full path in php.ini and you're good to go.

[XDebug]
zend_extension = php_xdebug-2.8.0-7.2-vc15-x86_64.dll
xdebug.remote_enable = 1
xdebug.remote_autostart = 1

You can type php -m to confirm xebug is loaded or throw in a php file with phpinfo(); restart Apache and search for xdebug.

Good luck!



来源:https://stackoverflow.com/questions/10248497/xdebug-not-loading

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!