![]() |
|
|
|||||||
| Tutorials This forum focuses on showing people how to do things in Delphi for PHP including step by step how-to guldes and screencasts etc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Firebird is supported by PHP, and Delphi for PHP can support it, but it can't out of the box.
What is not well documented about a Delphi for PHP to Firebird connection, is the fact that names of libraries can overlap in WIndows. In this first post, I'd put a foreword to clarify situation. PHP has a set of functions' libraries to "expand" his language. Well, in Windows package, php_interbase.dll is one of these interface libs. For historical reasons php_interbase.dll (as released in Windows PHP package) searches for the Interbase/Firebird "compatible" client library named GDS32.DLL. When all this started, some years ago, wasn't so problematic, because there were complete or almost good compatibility between client lib (i.e. gds32.dll) and any of two servers. Some time after, Firebird and Interbase projects forked in a manner that Interbase newer version ( > 6.5 ) were no more compatible with newer Firebird's version ( >= 1.5 ). So Firebird project changed GDS32.DLL name to FBCLIENT.DLL maintaing the possibility to install it as GDS32.DLL for older programs compatibility purposes. Note that the client library's interface to application program has compatible interface, but speakes to server in different language: this is why Firebird server doesn't communicate correctly with Interbases's client lib. I did already post solution somewhere in the web, but I'll put in next post trying to write clearer.
__________________
Ciao. Mimmo. Last edited by u.masotti; 27th March 2009 at 21:02. Reason: Better explanation of (in)compatibilities. |
| Sponsored Links |
|
|
|
|||
|
When Delphi for PHP installs, it installs IDE, PHP, Apache server, PHP debugger, and a lot of other small pieces of software.
Among them there are the so called "database client libraries", that aren't part of PHP, but are part of database's servers software package. So you'll be able to find the client libraries from Oracle, MsSQL, MySql, Sybase, Interbase and so on. And Firebird? Actually Firebird's client lib is called fbclient.dll, and you cannot find it in Delphi for PHP installation dir, as it is out of the box. Ok, you can say, instead I found GDS32.DLL: I can copy FBCLIENT.DLL in the same directory and I'd solve problem. No, this is not a solution: no piece in Windows PHP package searches for fbclient.dll. PHP interface library, as stated before, searches for GDS32.DLL only, and that is Interbase client lib. Anyway, you don't ever need Firebird's GDS32.DLL in Delphi for PHP subdirectories: you need to install it properly only in system directories because this is a piece of software maintained from Firebird installation system, not from D4PHP. So there are two simple step to get Firebird working:
Step 1.
Step 2.
Now you can connect Firebird through ibase_* native set of functions, or trough native components (Database and Query) setting database driver as "firebird". Hope that this guide will help people developing in Delphi for PHP that is using Firebird as database server.
__________________
Ciao. Mimmo. |
|
|||
|
Hello,
I have followed your instructions, combined with the Embarcadero 'Creating a Database' instructions. I can connect to the employee database in the Data Explorer, but when I try to run the app as suggested in the 'Creating a Database' guide, all I get is a blank page. I should add that I am successfully running Firebird with php on this PC. I'm not sure what the trouble is. What additional information would you need to help me? Alternatively, how do I go about troubleshooting this problem? Thanks |
|
|||
|
Sorry for late answer.
Quote:
Add these two lines as the very first of your script. PHP Code:
A completely blank page smell like a PHP fatal syntax error.
__________________
Ciao. Mimmo. |