Re: php/osx and firebird

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, June 15, 2005 9:04 am, James said:
> $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);
>
> 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

I don't know diddly-squat about this Firebird ibase stuff, but this sounds
to me like a network error message that your PHP machine can't get to the
Firebird machine.

Start at the lowest level.

Can you "ping 10.1.4.58" from your PHP box?  It might be
configured/firewalled to not let you do "ping" so it's not REQUIRED that
ping work for your PHP script to work, but it's at least a start.

> Warning: ibase_query() [function.ibase-query]: invalid database
> handle (no active connection) in d:\htdocs\Website\PHP\dtest.php on
> line 20

Ignore this for now -- It's a direct result of the first error.

> I was able to use isql to remotely connect using the parameters above.

Wow.  Okay, that's way better than my ping test above...

Still, double check that this still works, just to be SURE.

> What am I not doing on the PHP end to get this to work?

PHP runs as the user defined by "User" directive in httpd.conf

Odds are really good your isql remote test was run by you logged in as,
errr, whatever Windows logs you in as, or whatever you log in as, if
you're on a Windows box that has logins, or... Well, anyway, it almost for
sure is not the same "User" as you have set in httpd.conf

In the ideal world, you'd know how to log into your Windows box as the PHP
User -- If you *DO* log in to your Windows box, then do this.

If not, JUST FOR TESTING, you could change the User setting in httpd.conf
to be, like, "Administrator" or whatever the Windoze root user is called
this week.

Restart Apache, and test.

If that works, you have narrowed it down to a permissions problem.  God
only knows how you fix that under Windows, but it's the most likely source
of your problem.

The thing you *DO* *NOT* want to do, no matter what, is leave Apache
running as Administrator!  Change it back immediately after your test.

If you have to choose between running PHP as Admin, and getting fired
because you can't make this work, start looking for a new job.  It's that
important.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux