3

I am trying to enable Xdebug on my AMPPS. I have used Xdebug and followed the given instructions: enter image description here.

On a point 6 i run make command that compiles the xdebug library. then to check if everything went well i runned make test. I discover these ERRORS:

    Failed loading ~/Dev/Testing/xdebug-2.2.6/modules/xdebug.so:  dlopen(~/Dev/Testing/xdebug-2.2.6/modules/xdebug.so, 9): no suitable image found.
  Did find:
        ~wrong architecture
    Failed loading ~/Dev/Testing/xdebug-2.2.6/modules/xdebug.so:  dlopen(~/Dev/Testing/xdebug-2.2.6/modules/xdebug.so, 9): no suitable image found.  
Did find:
        ~/Dev/Testing/xdebug-2.2.6/modules/xdebug.so: mach-o, but wrong architecture

And what did I do wrong...? and is this an ideal way of installing/enabling Xdebug anyway....? if not any turorial..?

kuldipem
  • 1,719
  • 1
  • 19
  • 32
Tomazi
  • 787
  • 3
  • 11
  • 30

1 Answers1

9

So maybe another poor soul finds this but I solved it with changing the command ./configure with:

./configure --enable-xdebug CC="gcc -arch i386" CXX="g++ -arch i386"

I'm using OS X El Capitan (10.11.5) with Ampps on PHP 5.6.Everything else stays the same as mention on the wizard.

The problem is that Ampps is 32bit and when you make you are compiling a 64bit version.

JohnnyAce
  • 3,569
  • 9
  • 37
  • 59
  • Man I'd give you more than one upvote if I could. Thank you very much. – user3295878 Dec 13 '16 at 07:25
  • How could I find my architecture? Tried it on sierra but it doesn't seems to work :( – Hugo H Jul 12 '17 at 12:03
  • 1
    Try with `uname -m` this gives me `x86_64` as a result. For checking the file architecture try with `lipo -info`, for example `lipo -info /Applications/AMPPS/php-7.0/lib/extensions/ext/tokenizer.so` results on `Non-fat file: /Applications/AMPPS/php-7.0/lib/extensions/ext/tokenizer.so is architecture: i386` – JohnnyAce Jul 12 '17 at 23:27