Before compiling PHP extension you must have Autoconf, you can install it via Homebrew (brew install autoconf) Because we needs Firebird libs. for compiling interbase, we have to download Firebird Server Package (http://www.firebirdsql.org/en/downloads), download the LIPO package (important!)
- Check which PHP version your MAMP server use, for example version 3.4.0 use PHP 5.6.10 by default
- Download PHP source code from https://secure.php.net/downloads.php
- Unzip downloaded sources, rename it to "php" and move it to your MAMP include folder /Applications/MAMP/bin/php/php5.6.10/
- Enter to interbase extension folder cd /Applications/MAMP/bin/php/php5.6.10/include/php/ext/interbase/
- Run phpize /Applications/MAMP/bin/php/php5.6.10/bin/phpize
- Run configure ./configure
- Create symbolic link to Firebird ibase.h and iberror.h in our include/php folder so ln -s /Library/Frameworks/Firebird.framework/Headers/*.h /Applications/MAMP/bin/php/php5.6.10/include/ these two header files are required
- Run make
- Run sudo make install
You should get your interbase.so ! Wooah
- Check which PHP version your MAMP server use, for example version 4.1.1 use PHP 7.1.1
- Download PHP source code from https://secure.php.net/downloads.php
- Unzip downloaded sources, rename it to "php" and move it to your MAMP include folder /Applications/MAMP/bin/php/php7.1.1/
- Enter to interbase extension folder cd /Applications/MAMP/bin/php/php7.1.1/include/php/ext/interbase/
- Run phpize /Applications/MAMP/bin/php/php7.1.1/bin/phpize
- Run configure ./configure --with-php-config=/Applications/MAMP/bin/php/php7.1.1/bin/php-config
- Create symbolic link to Firebird ibase.h and iberror.h in our include/php folder so ln -s /Library/Frameworks/Firebird.framework/Headers/.h /Applications/MAMP/bin/php/php7.1.1/include/ ln -s /Library/Frameworks/Firebird.framework/Headers/.h /Applications/MAMP/bin/php/php7.1.1/include/php/ext/interbase/include/ these two header files are required
- Run make (for someone maybe make -j8)
- Run make install
You should get your interbase.so (/Applications/MAMP/bin/php/php7.1.1/include/php/ext/interbase/modules/interbase.so) ! Wooah