Subject Re: [firebird-php] firebird + PDO - what is the status?
Author Jochem Maas
Yves Glodt wrote:
> Jochem Maas wrote:
>

...

>>>
>>>>anyone know if firebird/PDO is usuable yet? has anyone tried it
>>>>lately? whats you're experience?
>>>
>>>
>>>I played with it a little (partly porting one of my apps to it
>>>http://i-man.sf.net), and it seems to work...
>>>
>>>Take this as example code (or check iman's cvs, the file is /db/pdo.php):
>>
>>
>>did that - quite helpful thanks!
>>and I have put a item on my todo list to try out you app!
>>I always like to see firebird/php in action :-)
>
>
> me too, it's just a great DB, if only more people knew about it! :-)

indeed. indeed.
let's all try a bit more active on this list! I find it a pity that
95% of mails are only about installing firebird/php.

what do other people think?

...

>>>$test_base = "localhost:d:\i-man.gdb";
>>
>>
>>interesting to see that this dns works - I've had trouble with this
>>in the past. (the 'localhost:' prefixed to 'd:')
>
>
> IIRC it's the only way I could make it work at all...

find the file called aliases.conf that lives alongside your firebird.conf,
it allowes you to define an alias (what else) to a DB liek so:

iman "D:\path\to\your\db.gdb"

then rather than given the full servername+path to your DB yuou just pass 'iman'
and firebird works out where it is.

every handy - especially when dev'ing on more than one machine and/or using
cvs to export your code onto different boxes.

I have no idea if the alias will be accepted by the PDO driver but assume that
it just passes it along to the underlying extension/code (whatever the correct
technical name for it is!) as is - high probability it will work.

>
> regards,
> Yves
>
>
>>>$db = new PDO("firebird:dbname=$test_base",$user,$password) or
>>>die('Connection failed');