
The simplest way of adding Firebird support is adding the interbase module to an existing PHP installation. On Windows it's a matter of simply unpacking the .zip package and extracting the PHP_INTERBASE.DLL extension, or choosing the Interbase package while installing from setup.exe installer. Please note that in the latter case, the installer also installs old gds32.dll from InterBase 6.0, which you need to delete manually and replace with Firebird's fbclient.dll (just rename it to gds32.dll). On Linux, you need to compile the interbase.so module. It is done like this:
1. install php-devel package (needed for phpize. If you already have phpize command, you don't need it)
2. get the php source code for the exact version as you are running
3. unpack the source and go to ext/interbase directory
4. run: phpize
5. run: ./configure --with-interbase=shared,/opt/firebird
6. run: make
7. this will create interbase.so module (most probably in .libs subdirectory)
The following steps apply for Windows as well:
8. copy the module (.so or .dll) to /usr/lib/php/extensions (or whatever is the 'extension_dir' setting in php.ini)
9. uncomment the ;extension=php_interbase.dll in php.ini
10. restart Apache if you are using PHP with it
Here's a set of tests to see if you extension is working properly:
http://fbexport.sourceforge.net/ibtest.php.txt
Please note that PHP5.x has a bug regarding NUMERIC(18,7) and other datatypes with precision higher than 6. The bug has been reported to PHP bug tracker, but is not fixed yet (PHP 5.2.3).