0

I have been having a option for a few days. When I try to run a PHPUnit test I get a message saying failed to load Xdebug. I have tried to reinstall, change filepaths etc but I am getting nowhere. Hoping somebody can help me out :)

PHP 7.4.3 (cli) (built: Oct  6 2020 15:47:56) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies

enter image description here

2
  • 4
    Just zend_extension=xdebug is enough to have Xdebug extension loaded (as long as it is located in the same folder as other PHP extensions). 1) Do you have actually an Xdebug extension file there at that `C:\php\ext` path? 2) What file that is (where did you get it from)? If it's from Xdebug website -- what URL did you use to download it (in case if it's for the wrong PHP/version)? Commented Apr 6, 2021 at 10:06
  • OMG now you have said this, can't believe it, I was using the wrong Xdebug extension file, I was using 32 bit instead of 64. Thanks for your help :) Commented Apr 6, 2021 at 10:18

1 Answer 1

3

Failing loading xxxx.dll is an indication that PHP can't load the extension file. This could have several reasons:

  1. The file does not exist → check if it does

  2. The permissions on the file are incorrect → check the permissions

  3. The file is of "the wrong extension type". Which can be either:

    • the extension is for the wrong wrong PHP version
    • the extension is of the wrong bitness (32 vs 64bit)
    • the wrong TS variant (NTS vs ZTS)
    • the wrong "debug mode" build of PHP (either debug, or nodebug)

The API type (except for bitness, which you can check with echo PHP_INT_SIZE;; 4 is 32bit, and 8 is 64bit) is reflected in the "Zend Extension Build" output in php -i or phpinfo().

You can use Xdebug's wizard to tell you which exact file to download for your specific set-up.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.