Subject Re: [firebird-php] PHP x Firebird in new projects
Author Lester Caine
Roberto Carlos wrote:
>>From PHP 5.3 on, it feels like php_interbase.dll will not be officialy supported anymore.
> As a matter of fact, it is not even downloadable from cvs on PHP 5.3. But it used to be in 5.2 and before.
> In this case, what technology should we use for new projects integrating PHP and Firebird?
> ADOdb, PDO, DBx, etc?
> Why?

Because Microsoft now has a hand in proceedings!
There is no problem what so ever with every other build of PHP other than
Windows, and the only reason there is now a problem with windows is because of
a decision by the people who have taken over the control of the windows
builds. It should be obvious that these have now been taken outside of the
normal PHP build process as they have their own sub-domain in php - a move
that some other php developers have complained about, but which is now a done
deal :(

Microsoft have had several versions of compiler - VC6, VC7, VC8 and VC9 are
all currently in use. Apache is in theory still built with VC6, as are a few
other components used with php, and the FB2.1 builds of Firebird are built
with VC8. You will see from the new windows download site at
http://windows.php.net/download/ that there are now different builds of php
for VC6 and VC9, and that the VC6 build is required for Apache and VC9 for IIS
(and in theory any other 'new' web server).

In PHP5.2.x, VC6 is used and the php_interbase.dll is quite happily being
compiled with the VC8 import library - AS IS DICTATED BY M$ should happen.
Since the Firebird end of things has been specifically designed so that you
can use Interbase or Firebird client or embeded versions simply by changing
the .dll that is visible to php or any other application, the version of VC is
irrelevant in this instance. The PROBLEM is that the windows PHP build team
are now demanding that the Firebird client is built with the same version of
M$ compiler as PHP, something which is simply not acceptable and breaks the
rules MICROSOFT lay down! It is not only Firebird that is affected by this,
other third party applications are falling foul of the same rule, and so the
BEST path forward for PHP5 is to remain with PHP5.2.x until such time as both
Apache and every other add-in such as Firebird - is available compiled in VC9.

What changed between PHP5.2 and PHP5.3 - nothing significant - There is no
reason that the same import library that is currently used for 5.2 can't be
used for 5.3, even if it is only used for the VC6 builds. HENCE u.masotti has
provided the correct file at
http://tech.groups.yahoo.com/group/firebird-php/files/ and while I have been
playing with this, I've built the x64 version of the same file - compiled with
VC9, but linked to the x64/VC8 version of the client library.

http://wiki.firebirdsql.org/wiki/index.php?page=FWAP64+Setup has all the notes
on the 64 bit builds, and various other pages on the Firebird wiki have other
information on using Firebird with php.

PDO is another story and I will not rant about that here, but suffice to say
that it causes a lot more problems than those it is supposed to clear. ADOdb
provides a clean, cross database environment for writing php code. It takes
care of many of the differences between SQL and data formats as well as
providing an agnostic means of creating and updating the database schemes.
Properly used, a project can switch between databases transparently. PDO has
non of the SQL/DDL abstraction, and as I understand even it's data abstraction
is a little flaky in places. Projects that have switched to it are now having
to write the abstraction layer - or more often - are simply writing for a
single database - in which case when even bother using PDO?

Apache/PHP/Firebird is live and well - as long as you don't use windows ;)

( As an aside, M$ has accepted that the rules for VC9 ARE wrong, and is
supposed to be rolling the restrictions back for VC10 or what ever they call it )

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php