Subject | How can I connect to a Firebird server on differnet port then 3050? |
---|---|
Author | nicky6797 |
Post date | 2007-07-07T02:22:15Z |
Hi, all. This question may seem trivial to some of you.
How can I connect to a Firebird server which listens on a different
port than the default one 3050?
I tried everything. I'm customed to connect to such a server using
the database string for example: "127.0.0.1/34534:c:\mybase.fdb"
but this doesn't work in php_ibase. Here is the code I use:
[code]
$db = '127.0.0.1/34534:c:\mybase.fdb';
$dbuser = 'SYSDBA';
$dbpass = 'masterkey';
$res = ibase_connect($db,$dbuser,$dbpass) or die("<br>" . ibase_errmsg());
[/code]
it returns
"Warning: ibase_connect(): Unable to complete network request to host
"127.0.0.1". Failed to locate host machine. Undefined service 34534/tcp."
I added the line
"gds_db 34534/tcp"
in the
windows/system32/drivers/etc/services file I even added empty line at
the end and stil nothing.
What is strange to me is that when I removed "gds_db 3050/tcp" from
the services file and removed the part "/34534" from the $db variable
the connecting went just fine, it didn't gave me "Undefined service
3050/tcp".
Maybe I'm changing the wrong file. I really don't believe that somehow
php_ibase doesn't support connecting to a server which listens to a
different port, although I must admit searching the web for a few
hours gave no results. The word "port" doesn't even get mentioned on
the official support site for php_ibase not even in a single web page.
Help quick thanks in advance.
How can I connect to a Firebird server which listens on a different
port than the default one 3050?
I tried everything. I'm customed to connect to such a server using
the database string for example: "127.0.0.1/34534:c:\mybase.fdb"
but this doesn't work in php_ibase. Here is the code I use:
[code]
$db = '127.0.0.1/34534:c:\mybase.fdb';
$dbuser = 'SYSDBA';
$dbpass = 'masterkey';
$res = ibase_connect($db,$dbuser,$dbpass) or die("<br>" . ibase_errmsg());
[/code]
it returns
"Warning: ibase_connect(): Unable to complete network request to host
"127.0.0.1". Failed to locate host machine. Undefined service 34534/tcp."
I added the line
"gds_db 34534/tcp"
in the
windows/system32/drivers/etc/services file I even added empty line at
the end and stil nothing.
What is strange to me is that when I removed "gds_db 3050/tcp" from
the services file and removed the part "/34534" from the $db variable
the connecting went just fine, it didn't gave me "Undefined service
3050/tcp".
Maybe I'm changing the wrong file. I really don't believe that somehow
php_ibase doesn't support connecting to a server which listens to a
different port, although I must admit searching the web for a few
hours gave no results. The word "port" doesn't even get mentioned on
the official support site for php_ibase not even in a single web page.
Help quick thanks in advance.