Subject Re: [firebird-php] PHP shell script
Author Milan Babuskov
Rui Francisco wrote:
> I'm using firebird in a php script for database access on a windows machine
> The problem is the following:
> I can connect to the database if i use the script in a browser but if i
> execute it like a shell script i get the following error:

The same script? Is it possible that you have two versions of php
installed, one for apache other for command-line (I always have setup
like that on Linux).

> DB Error: connect failed
> [nativecode=Unable to complete network request to host "localhost".
> Failed to l
> ocate host machine. Undefined service gds_db/tcp.] ** ibase://user:pass@l
> ocalhost/c:/path/file1.fdb

This is really strange: ibase://user...etc. I never used a syntax like
that. How exactly do you connect? Which php functions/classes do you
use? Can you post a relevant part of the code?

> I have already added gsb_db 3050/gdb to services file

It's gds_db, not gsb_db. And it's /tcp, not /gdb. So:

gds_db 3050/tcp

Milan Babuskov