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!
source share