Friday, September 25, 2009

Building #Firebird 2.5.x extension for #Php 5.x.x on #Windows

Follow the advice on howto compile php on windows with visual studio express (yucks)
http://wiki.php.net/internals/windows/stepbystepbuild
I  will not copy paste all  the steps here , a short document makes them easy to follow


1.Install Cisual Studio  C++ 20xx
http://www.microsoft.com/express/Downloads/#2008-Visual-CPP
2. get and install windows sdk 6.1
3. get a php 5.x snapshot or any stable version 5.x (do not extract yet!)


Next is is to download a zip file with firebird 2.5.x final from sourceforge 


in my case http://sourceforge.net/projects/firebird/files/firebird-win32/2.5.2-Release/Firebird-2.5.2.26540-0_Win32_pdb.zip/download


Next is to unzip the files from bin,include,lib
into C:\php-sdk\php53dev\vc9\x86\deps


enable firebird extension from the build console (By default thread safe version is build )


configure --disable-all --enable-cli --with-interbase 
nmake 
cd Release_TS
php -m 


should show you that interbase/firebird extension is there 








If you want to create the shared dll for the firebird extension you need to provide 
--with-interbase=shared to the configure script
otherwise it will be included in the big php executable 
Another note is if you do use IIS with fastcgi then you must disable threading support (Non Thread Safe ) in the configure part you must add --disable-zts



Update:
The work to compile full firebird 2.5.x server with visual c++ 20xx and $sudo make the php core developers happy is DONE (the firebird extension it will be included by default in official php 5.x zip file for windows)

No comments: