Subject Re: Any problem using PHP4.4.x, apache 1.x.x, firebird 1.5.x?
Author junkers109
Hi Helen,

Thank you very much for your input - greatly appreciated! There are hacks around a problem, and there are the correct ways to address the problem. I'm afraid as a newbie to Firebird/PHP, I take what I can trawl off the web. In this case the hack first and now your recommendation.

My only thought is that for someone just getting familiar with the Firebird environment, this is a rather steep curve. My experience with MySQL and Apache/PHP is once the setup is done, code examples just work and you get on with the learning process. In Firebird I've spent a good deal of time typing in example code only to get the undefined service gds_db/tcp error, and I haven't seen any sample code with a port reference in the connection string like you recommend (ie. remserver/13050:c:\databases\mydatabase.fdb). The sample code I was playing with were from the ADODb project - I guess those folks were hunkydory with the Firebird setup issues.

Anyways, now I know, and thank you again.

--- In firebird-php@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
>
> >> 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
>