Re: ibase_connect...how to specify a port?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



James wrote:
How do you specify a port to connect to? I tried using localhost:3050

you can't/don't specify the port in your connection string.

(3050 is the default port that Firebird) and that didn't work.

yeah somebody using the firebird extension! or trying at least. ;-)

you have to specify the port that firebird is bound to in the SERVICES
file (its name and location differ depending on your platform) -
on windows the firebird installer should do this for you.

on linux you have to edit /etc/services (the format is
pretty simple)

also check out the aliases.conf file which lives alongside your
fierbird.conf file where you can do stuff like:

mydb = '/path/to/your.gdb'

and then:

ibase_connect ( 'mydb', $username , $password );

which is nice and allows easy to port code :-)



$host = 'localhost:/path/to/your.gdb' ;

IIRC the localhost part is not required, so the following will do:
$host = '/path/to/your.gdb'

by all means come back with firebird questions - as far as firebird/php
are concerning I am a 1 man [marketing] army :-)

computed-fields, multi-db transactions, views, triggers, constraints, stored procedures,
PROPER parameterized queries!

it's like using Oracle without the pre-requisite second mortgage, without the
the nightmare API AND (maybe most important) with the added bonus that you are not making some
twat like Larry Elison even richer :-)

for those of you who are strong in DBs/SQL give it a try it's great stuff!

$username = 'SYSDBA';
$password = 'masterkey';

do change this :-) and/or lock down port 3050 on your firewall.

rgds


   $dbh = ibase_connect ( $host , $username , $password );

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux