Failed to create xdebug

I am trying to install xdebug with MAMP on my Mac. I downloaded xdebug-2.2.1.tgz and followed the xdebug wizard to run phpize. I ran make , after which I was informed of some missing files in /Applications/MAMP/bin/php/php5.4.4/include/php/Zend/* . So, I googled, and I saw that I had to download php5.4.4 and then paste some files into the new "include" directory that I created in /Applications/MAMP/bin/php/php5.4.4/include/php . But when I try to build again, I have this message:

 /Applications/MAMP/bin/php/php5.4.4/include/php/Zend/zend.h:51:11: fatal error: 'zend_config.h' file not found # include <zend_config.h> 

What should I do? Where can i get this file?

+4
source share
2 answers

I finally managed to install xdebug. In fact, I had to install the Xcode developer tool and then copy the files from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/php into /Applications/MAMP/bin/php/php5.4.4/include and then it worked!

+10
source

In fact, I thought maybe the make command could not find the headers. So I tried changing the make file:

 INCLUDES = -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib 

to

 INCLUDES = -I{Your Path to php_dir}/php -I{Your Path to php_dir}/php/main -I{Your Path to php_dir}/php/TSRM -I{Your Path to php_dir}/php/Zend -I{Your Path to php_dir}/php/ext -I{Your Path to php_dir}/php/ext/date/lib 

You can refer to this question to change the makefile. Describing the location of the header files in the makefile

You can use this command to find php.h

 sudo find / -name php.h 

If you don't have php header, you can install xcode.

After all this, everything is ready, enjoy!

0
source

All Articles