问题
Linux red hat, connect the drive to a remote server (192.168.0.103) via mount to /mnt/databases Then trying to connect
$idbh = ibase_connect("192.168.0.103/3050:/mnt/databases/XXX.IB", "SYSDBA", "masterkey", "WIN1251") or die(ibase_errmsg().' on line: '.__LINE__);
Result
ibase_connect(): I/O error for file "/mnt/databases/XXX.IB" Error while trying to open file unknown Win32 error 3
Try stat /mnt/databases/XXX.IB
File: `/mnt/databases/XXX.IB'
Size: 46415872 Blocks: 90752 IO Block: 16384 regular file
Device: 17h/23d Inode: 1970324836974627 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2013-07-16 16:04:08.470709400 +0400
Modify: 2013-06-17 13:03:03.600143300 +0400
Change: 2013-06-17 13:03:03.600143300 +0400
Why i cant connect?
回答1:
Do not attempt to access a Firebird or Interbase database via any form of mount. The server process should be on the same machine as the disk containing the database.
Your client would then communicate with the server process to interact with the database.
回答2:
You need to specify the alias of the database for connections, or the full path on disk relative to the Firebird Server. http://www.firebirdsql.org/manual/qsg2-databases.html
So if on the Firebird server the database is on C:\databases\db.fdb you need to provide that. A network drive/share is not going to work because from the FB Server context that doesnt exist.
Some applications (QuickBooks) fool you into thinking you need to share the folder where the file resides, but its actually just bootstrapping a TCP/IP socket connection to the Database Service. Firebird does not work that way.
来源:https://stackoverflow.com/questions/17676450/ibase-connect-remote-computer-host-and-shared-db-file-from-windows