Subject Re: [firebird-php] Accessing Firebird Database on other machine with adodb
Author Lester Caine
raja_s_patil wrote:
> Hi,
>
> Please refer following php code
>
> ===========================================================>>
> <?php
>
> include('adodb5/adodb.inc.php');
> include("adodb5/tohtml.inc.php");
>
> print "<pre>";
> print "this is test\n\n";
>
> $db = ADONewConnection('firebird'); # eg 'mysql' or 'postgres'
> $db->debug = true;
> $db->Connect( 'RSP-1710', 'SYSDBA', 'masterkey', '/FB_DEV/FB_DATA/Data/BOSS_FB2_ANagar.GDB' );
> $qry = 'select * from stations order by stations.station';
>
> $rs = $db->Execute($qry,false);
>
> echo rs2html($rs);
>
> print "</pre>";
>
> $db->close();
> ?>
> <<===========================================================
>
> where RSP-1710 is Linux Database server, Current machine is
> win-XP WAMP. I can access same database through IBexpert
> but the above script throws following error to me.
>
> ===========================================================>>
> Warning: ibase_connect() [function.ibase-connect]: Unable to complete network request to host "10.1.1.1". Failed to locate host machine. Undefined service gds_db/tcp. in C:\wamp\www\adodb5\drivers\adodb-ibase.inc.php on line 74
>
> 10.1.1.1: Unable to complete network request to host "10.1.1.1". Failed to locate host machine. Undefined service gds_db/tcp.
> <<===========================================================
>
> Can somebody help me in this situation. I am new to Web Development
> so I am afraid that whether database from another machine is
> allowed to access or not in PHP. But in real life application
> I would like to keep application on one computer and database
> on another computer.

This is not a problem with the web stuff. Need to go back a step and
check that firebird has actually started properly the machine you are
trying to connect to and that the client software is available on the
windows machine. Although the error says it all. The windows machine is
not able to SEE 'RSP-1710' which it is mapping to IP address 10.1.1.1

Undefined service gds_db/tcp. is an old problem where the client is not
set up properly.

Where are you running IBExpert? I would be starting with flamerobin on
both the linux and windows machines and then checking connections
between machines.

--
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