[PHP-DB] How to Connect remote DB server?

2003-03-12 Thread Patrick LOK
It is possible to connect a remote db server using x_connect? 
e.g. a PostgreSQL in server PSQLDB, ip=192.168.0.100  and a MSSQL server MSSQLDB, 
ip=192.168.0.110

I tried pgsql_connect("psqldb","administrator","") & 
pgsql_connect("192.168.0.100","administrator","") but failed!

Error is "Unable to connect to server: psqldb in psqltest.php on line 2" & "Unable to 
connect to server: 192.168.0.100 in psqltest.php on line 2"

Can anyone help?

regards
./pl


Re: [PHP-DB] How to Connect remote DB server?

2003-03-12 Thread Jason Wong
On Wednesday 12 March 2003 19:28, Patrick LOK wrote:
> It is possible to connect a remote db server using x_connect?
> e.g. a PostgreSQL in server PSQLDB, ip=192.168.0.100  and a MSSQL server
> MSSQLDB, ip=192.168.0.110
>
> I tried pgsql_connect("psqldb","administrator","") &
> pgsql_connect("192.168.0.100","administrator","") but failed!
>
> Error is "Unable to connect to server: psqldb in psqltest.php on line 2" &
> "Unable to connect to server: 192.168.0.100 in psqltest.php on line 2"

Yes, it is possible to connect to a remote DB server. You have to make sure 
that:

a) the DB server in question is configured to accept remote connections
b) any intervening firewall is correctly configured to allow DB traffic


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
--
/*
Dr. Livingston?
Dr. Livingston I. Presume?
*/


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



Re: [PHP-DB] How to Connect remote DB server?

2003-03-12 Thread Patrick LOK
There is no firewall within the LAN environment.

I tried the mssql_connect too using mssql_connect("testdb","sa","") but same
error returned!
Any idea?

./pl

"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Wednesday 12 March 2003 19:28, Patrick LOK wrote:
> > It is possible to connect a remote db server using x_connect?
> > e.g. a PostgreSQL in server PSQLDB, ip=192.168.0.100  and a MSSQL server
> > MSSQLDB, ip=192.168.0.110
> >
> > I tried pgsql_connect("psqldb","administrator","") &
> > pgsql_connect("192.168.0.100","administrator","") but failed!
> >
> > Error is "Unable to connect to server: psqldb in psqltest.php on line 2"
&
> > "Unable to connect to server: 192.168.0.100 in psqltest.php on line 2"
>
> Yes, it is possible to connect to a remote DB server. You have to make
sure
> that:
>
> a) the DB server in question is configured to accept remote connections
> b) any intervening firewall is correctly configured to allow DB traffic
>
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> --
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-db
> --
> /*
> Dr. Livingston?
> Dr. Livingston I. Presume?
> */
>



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



Re: [PHP-DB] How to Connect remote DB server?

2003-03-12 Thread Mark
A couple of things. First, I believe it's pg_connect(), not
pgsql_connect(). Also, note that according to the docs, the old
syntax with multiple parameters 
$conn = pg_connect("host", "port", "options", "tty", "dbname") 
has been deprecated.

But more importantly, can you ping the postgres/mssql server from the
web server? Can you connect to them via the command line or via ODBC?
Try to narrow it down to the network, PHP, or your code.


--- Patrick LOK <[EMAIL PROTECTED]> wrote:
> There is no firewall within the LAN environment.
> 
> I tried the mssql_connect too using mssql_connect("testdb","sa","")
> but same
> error returned!
> Any idea?
> 
> ./pl
> 
> "Jason Wong" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > On Wednesday 12 March 2003 19:28, Patrick LOK wrote:
> > > It is possible to connect a remote db server using
> x_connect?
> > > e.g. a PostgreSQL in server PSQLDB, ip=192.168.0.100  and a
> MSSQL server
> > > MSSQLDB, ip=192.168.0.110
> > >
> > > I tried pgsql_connect("psqldb","administrator","") &
> > > pgsql_connect("192.168.0.100","administrator","") but failed!
> > >
> > > Error is "Unable to connect to server: psqldb in psqltest.php
> on line 2"
> &
> > > "Unable to connect to server: 192.168.0.100 in psqltest.php on
> line 2"
> >
> > Yes, it is possible to connect to a remote DB server. You have to
> make
> sure
> > that:
> >
> > a) the DB server in question is configured to accept remote
> connections
> > b) any intervening firewall is correctly configured to allow DB
> traffic
> >
> >
> > --
> > Jason Wong -> Gremlins Associates -> www.gremlins.biz
> > Open Source Software Systems Integrators
> > * Web Design & Hosting * Internet & Intranet Applications
> Development *
> > --
> > Search the list archives before you post
> > http://marc.theaimsgroup.com/?l=php-db
> > --
> > /*
> > Dr. Livingston?
> > Dr. Livingston I. Presume?
> > */
> >
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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



[PHP-DB] Re: [PHP] Re: [PHP-DB] How to Connect remote DB server?

2003-03-12 Thread Patrick LOK
Couldn't be !  I have MS client connecting to the db-server!  I tried
odbc_connect for both MSSQL & PostgreSQL and it is ok!
However, odbc connection is no good for db processing!

Further help?

./pl


"Niklas lampén" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Possibly the db-server is accepting only localhost connections.


Niklas


-Original Message-
From: Patrick LOK [mailto:[EMAIL PROTECTED]
Sent: 12. maaliskuuta 2003 14:39
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] Re: [PHP-DB] How to Connect remote DB server?


There is no firewall within the LAN environment.

I tried the mssql_connect too using mssql_connect("testdb","sa","") but same
error returned! Any idea?

./pl

"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Wednesday 12 March 2003 19:28, Patrick LOK wrote:
> > It is possible to connect a remote db server using x_connect?
> > e.g. a PostgreSQL in server PSQLDB, ip=192.168.0.100  and a MSSQL
> > server MSSQLDB, ip=192.168.0.110
> >
> > I tried pgsql_connect("psqldb","administrator","") &
> > pgsql_connect("192.168.0.100","administrator","") but failed!
> >
> > Error is "Unable to connect to server: psqldb in psqltest.php on
> > line 2"
&
> > "Unable to connect to server: 192.168.0.100 in psqltest.php on line
> > 2"
>
> Yes, it is possible to connect to a remote DB server. You have to make
sure
> that:
>
> a) the DB server in question is configured to accept remote
> connections
> b) any intervening firewall is correctly configured to allow DB traffic
>
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development
> *
> --
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-db
> --
> /*
> Dr. Livingston?
> Dr. Livingston I. Presume?
> */
>



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

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail. For
more information, connect to http://www.F-Secure.com/

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/



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