Subject | Accessing Firebird Database on other machine with adodb |
---|---|
Author | raja_s_patil |
Post date | 2009-04-25T10:47:13Z |
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.
Thanks and Best regards.
Raja
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.
Thanks and Best regards.
Raja