You are here: Re: [PHP] php/osx and firebird « PHP « IT news, forums, messages
Re: [PHP] php/osx and firebird

Posted by "Kristen G. Thorson" on 06/15/05 20:21

"Undefined service gds_db/tcp."

Sounds to me like it's not finding the port in services. I don't know
what default port Firebird is listening on, but you should have an entry
like

gds_db/tcp 1234/tcp

in c:\windows\system32\drivers\etc\services. You'll have to find out
exactly which port it's listening on. I think you may need this on both
the client and the server.


kgt





James wrote:

> I have a windows machine with Firebird and the default database.
>
>
>
> I've configured another machine with Apache and PHP. I want to write
> PHP scripts to remotely access the Firebird database.
>
>
> I followed the instructions at:
> http://us3.php.net/ibase
>
>
> I changed the php.ini to enable the php_interbase.dll and the
> php_gd2.dll by commenting out the two lines under Windows Extensions
>
> I also copied gds32.dll from the php directory to the
> C:\windows\system32 directory.
>
> I restarted Apache.
>
>
> This is in my PHP script:
> "
> $host = "10.1.4.58:c:\fbwin50\fbdata\fbdata.fdb";
> $username = "SYSDBA"; $password = "masterkey";
> $dbh = ibase_pconnect ($host, $username, $password);
> $stmt = "SELECT * FROM EVENTTYP";
> $sth = ibase_query ($dbh, $stmt);
>
>
> I get the following error:
>
> Warning: ibase_pconnect() [function.ibase-pconnect]: Unable to
> complete network request to host "10.1.4.58". Failed to locate host
> machine. Undefined service gds_db/tcp. in
> d:\htdocs\Website\PHP\dtest.php on line 17
>
> Warning: ibase_query() [function.ibase-query]: invalid database handle
> (no active connection) in d:\htdocs\Website\PHP\dtest.php on line 20
> "
>
>
>
>
> I was able to use isql to remotely connect using the parameters above.
>
>
> What am I not doing on the PHP end to get this to work?
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация