[PHP-DB] Re: [PHP] Re: [PHP-DB] How to Connect remote DB server?
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
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 Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] How to Connect remote DB server?
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
[PHP-DB] Re: Cannot connect PostgreSQL 7.3.1. Using PHP thru...
tcpip_socket is enabled! access to postgresql is granted; ip-address is added to pg_hba.conf - METHOD = trust ./pl "Patrick Lok" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have the following setups: > *PostgreSql 7.3.1 and MSSQL on Win2k server (A) > *Apache 1.3.x + PHP 4.3.1.1(using CGI & loaded w/ php_pgsql.dll) + ODBC for > PostgreSql v7.02.00.05 on Win2K server (B) > > I tried to use phppgadmin 2.4.2 and odbc for postgresql to connect > PostgreSql in (A) but both connection failed! > > Can somebody give me some advices? > Can PHP access remote DB server? > Can ODBC for PostgreSql access remote DB server? > > Best regards > ./pl > > > > Using PHPPGADMIN 2.4.2 to administer but it says "Wrong username/password. > Access denied". > > The following is logged on psqlodbc_.log: > DSN info: > DSN='PostgreSQL',server='192.168.1.16',port='5432',dbase='tet',user='adminis > trator',passwd='' > > onlyread='0',protocol='6.4',showoid='0',fakeoidindex='0',showsystable='0' > conn_settings='',conn_encoding='OTHER' > translation_dll='',translation_option='' > > > I wrote a simple php program in (B) to connect to server (A) using odbc for > postgresql but the connection failed! > > $rtn = odbc_connect("PostgreSql","administrator",""); > $cur=odbc_exec($rtn,"select d_base, high_jrnal from salfmsc"); > while(odbc_fetch_row($cur)){ > $fld1=odbc_result($cur,1); > $fld2=odbc_result($cur,2); > echo $fld1; > echo ("-"); > echo $fld2; > echo (""); > } > echo odbc_close($rtn); > ?> > > BUT Warning is returned. > Warning: SQL error: Could not connect to the server; Could not connect to > remote socket., SQL state 08001 in SQLConnect in > d:\tmp\webcodetest\mstest.php on line 3 > > The following is logged on psqlodbc_.log: > DSN info: > DSN='PostgreSql',server='192.168.1.16',port='5432',dbase='tet',user='adminis > trator',passwd='' > > onlyread='0',protocol='6.4',showoid='0',fakeoidindex='0',showsystable='0' > conn_settings='',conn_encoding='OTHER' > translation_dll='',translation_option='' > conn = 15742608, PGAPI_Connect(DSN='PostgreSql', UID='teter', PWD='') > Global Options: Version='07.02.0005', fetch=100, socket=4096, > unknown_sizes=0, max_varchar_size=254, max_longvarchar_size=8190 > disable_optimizer=1, ksqo=1, unique_index=1, > use_declarefetch=0 > text_as_longvarchar=1, unknowns_as_longvarchar=0, > bools_as_char=1 NAMEDATALEN=64 > extra_systable_prefixes='dd_;', conn_settings='' > conn_encoding='OTHER' > CONN ERROR: func=PGAPI_Connect, desc='Error on CC_connect', errnum=101, > errmsg='Could not connect to the server' > > henv=15742552, conn=15742608, status=0, num_stmts=16 > sock=15753592, stmts=15761872, lobj_type=-999 > Socket Info --- > socket=-1, reverse=0, errornumber=4, errormsg='Could not connect > to remote socket.' > buffer_in=15753664, buffer_out=15757768 > buffer_filled_in=0, buffer_filled_out=0, buffer_read_in=0 > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Cannot connect PostgreSQL 7.3.1. Using PHP thru...
I have the following setups: *PostgreSql 7.3.1 and MSSQL on Win2k server (A) *Apache 1.3.x + PHP 4.3.1.1(using CGI & loaded w/ php_pgsql.dll) + ODBC for PostgreSql v7.02.00.05 on Win2K server (B) I tried to use phppgadmin 2.4.2 and odbc for postgresql to connect PostgreSql in (A) but both connection failed! Can somebody give me some advices? Can PHP access remote DB server? Can ODBC for PostgreSql access remote DB server? Best regards ./pl Using PHPPGADMIN 2.4.2 to administer but it says "Wrong username/password. Access denied". The following is logged on psqlodbc_.log: DSN info: DSN='PostgreSQL',server='192.168.1.16',port='5432',dbase='tet',user='adminis trator',passwd='' onlyread='0',protocol='6.4',showoid='0',fakeoidindex='0',showsystable='0' conn_settings='',conn_encoding='OTHER' translation_dll='',translation_option='' I wrote a simple php program in (B) to connect to server (A) using odbc for postgresql but the connection failed! "); } echo odbc_close($rtn); ?> BUT Warning is returned. Warning: SQL error: Could not connect to the server; Could not connect to remote socket., SQL state 08001 in SQLConnect in d:\tmp\webcodetest\mstest.php on line 3 The following is logged on psqlodbc_.log: DSN info: DSN='PostgreSql',server='192.168.1.16',port='5432',dbase='tet',user='adminis trator',passwd='' onlyread='0',protocol='6.4',showoid='0',fakeoidindex='0',showsystable='0' conn_settings='',conn_encoding='OTHER' translation_dll='',translation_option='' conn = 15742608, PGAPI_Connect(DSN='PostgreSql', UID='teter', PWD='') Global Options: Version='07.02.0005', fetch=100, socket=4096, unknown_sizes=0, max_varchar_size=254, max_longvarchar_size=8190 disable_optimizer=1, ksqo=1, unique_index=1, use_declarefetch=0 text_as_longvarchar=1, unknowns_as_longvarchar=0, bools_as_char=1 NAMEDATALEN=64 extra_systable_prefixes='dd_;', conn_settings='' conn_encoding='OTHER' CONN ERROR: func=PGAPI_Connect, desc='Error on CC_connect', errnum=101, errmsg='Could not connect to the server' henv=15742552, conn=15742608, status=0, num_stmts=16 sock=15753592, stmts=15761872, lobj_type=-999 Socket Info --- socket=-1, reverse=0, errornumber=4, errormsg='Could not connect to remote socket.' buffer_in=15753664, buffer_out=15757768 buffer_filled_in=0, buffer_filled_out=0, buffer_read_in=0 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php