Subject Re: [firebird-php] PDO connection problems
Author Lester Caine
Robert martin wrote:
> Hi
> I am new to this group so excuse me if it has been covered many times (I
> did a search but cant find much).
> I have some PHP scripts that uses PDO as the database connection
> method. I used PDO because of its multi database connection system. It
> is working great at a number of sites using MYSQL but I am now trying to
> use it with Firebird.

Take care - PDO is ONLY connection compatible with different databases
which is why many of us are still using the alternative libraries that
also handle data mapping and SQL mapping.

> I have setup IIS and installed PHP / PDO / Firebird extension (PHP
> 5.3). PhpInfo shows everything is running. In my scripts I should be
> able to change the connection string and it should be done, however my
> connection string just wont work.

But 5.3 does not have the Firebird stuff included yet - where are you
getting the pdo_firebird extension from?

> my connection script is as follows
> $dbh = new
> PDO("firebird:dbname=localhost:C:\\ReportDB\\reports.fdb", "SYSDBA",
> "masterkey");

Not using PDO at all myself, I'd probably suggest setting up an alias
for the database and loosing the path details, but all the other drivers
seem to need 'driver:host=hostname;dbname=DbName' which I presume is
what you are using with MySQL?

> With this I get a 'HTTP/1.1 500 Internal Server Error'. I have tried it
> without the double slashes and it no longer fails but returns NULL.
> Actually I have tried just about everything I can think of and no go !!
> Any help would be greatly appreciated :)

php_interbase is a little more cooperative on error messages and you
will find a version of the extension for 5.3 in the files section

Lester Caine - G8HFL
Contact -
L.S.Caine Electronic Services -
EnquirySolve -
Model Engineers Digital Workshop -
Firebird -