Subject Re: [firebird-php] Re: Any problem using PHP4.4.x, apache 1.x.x, firebird 1.5.x?
Author Helen Borrie
>> On 2.3.2006 1:05 willowdan2004 wrote:
>> > Couldnt connect to database!: Unable to complete network request to
>> > host "localhost". Failed to locate host machine. Undefined service
>> > gds_db/tcp.
>> >

>--- In firebird-php@yahoogroups.com, Jiri Cincura <diskuze@...> wrote:
>>
>>
>> Add into %windir%\system32\drivers\etc\services line like this:
>> gds_db 3050/tcp fb #Firebird
>>
>> and restart Apache&PHP.

At 04:00 PM 26/10/2009, you wrote:
>Thanks Jiri, that worked for me.
>
>It's October 2009. Your post was in 2006 (if I recall correctly). One would figure something like this would have been taken care of by the Firebird folks by now. ;)

Errrm, not like that. Do it on your development box, if you must, but don't deploy it.

Firebird 1.5 and forward don't depend on that Services entry on either the client or server. Though it's still supported for legacy reasons, there are 50 good reasons not to do it. For one thing, InterBase still uses it unconditionally; for another, there is one heck of a lot of software out there now based on Firebird that blindly uses port 3050. The Nod32 anti-virus program is a case in point. The likelihood of clashes is right up there.

Use the correct client library for the Firebird server that your applications will connect to. By default, it looks for Firebird on port 3050 of the server...so far so good, so gds_db is simply not needed. However, if you know that the server environment can be messed up by someone installing one of these "dumb" port 3050 installations, deploy *your* Firebird server installation with RemoteServicePort (in firebird.conf) configured to something different, such as 13050 (or something else in the high range, your choice. Port 3051 is almost as dumb as 3050.)

Write your client to look directly for that port by including it in the connection string, e.g.

remserver/13050:c:\databases\mydatabase.fdb

Or, better still,
remserver/13050:myAlias

Helen