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
then I was told of some missing files in /Applications/MAMP/bin/php/php5.4.4/include/php/Zend/*
. So, I googled that and I saw I had to download php5.4.4 and then push some files in a new 'include' directory 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 ?
I finally managed to install xdebug. In fact, I had to install 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 !
Indeed,I thought maybe the make command can not find headers.So I tried to change the makefile:
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 may consult this question to change makefile Describing header file locations in makefile
You may 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 these,everything is ready now,enjoy!