Postgres 7.1, iODBC and PHP4

From: "Przem Kowalczyk" <przem(at)engine(dot)com(dot)pl>
To: pgsql-general(at)postgresql(dot)org(dot)pgsql-odbc(at)postgresql(dot)org
Subject: Postgres 7.1, iODBC and PHP4
Date: 2001-04-20 12:50:22
Message-ID: 9bpbci$2jpd$1@news.tht.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-odbc

Hi.

I've encountered some problems with settig up the subject configuration.
It looks like php is able to connect to ODBC, but then ODBC cannot connect
to Posgresql.

Warning: SQL error: Missing server name, port, or database name in call to
CC_connect., SQL state IM002 in SQLConnect in
/www/virtual/firebird/common/pre.php on line 25

I've checked the log, and found:

DSN info: DSN='wisenet',server='',port='',dbase='',user='',passwd=''
onlyread='',protocol='',showoid='',fakeoidindex='',showsystable=''
conn_settings=''
translation_dll='',translation_option=''
conn = 136550944, SQLConnect(DSN='wisenet', UID='nobody ', PWD='')
Global Options: Version='07.01.0004', fetch=100, socket=4096,
unknown_sizes=0, max_varchar_size=254, max
_longvarchar_size=8190
disable_optimizer=1, ksqo=1, unique_index=0,
use_declarefetch=0
text_as_longvarchar=1, unknowns_as_longvarchar=0,
bools_as_char=1
extra_systable_prefixes='dd_;', conn_settings=''
CONN ERROR: func=SQLConnect, desc='Error on CC_connect', errnum=201,
errmsg='Missing server name, port,
or database name in call to CC_connect.'
------------------------------------------------------------
henv=136439328, conn=136550944, status=0, num_stmts=16
sock=136557408, stmts=136078640, lobj_type=-999
---------------- Socket Info -------------------------------
socket=-1, reverse=0, errornumber=0, errormsg='(NULL)'
buffer_in=136557448, buffer_out=136074536
buffer_filled_in=0, buffer_filled_out=0, buffer_read_in=0

As you see there is no server or port parameter, but they exist in my
odbcinst.ini and odbc.ini

odbcinst.ini:
---start
[PostgreSQL]
Debug=0
CommLog=1

---end
odbc.ini:
---start
;
; odbc.ini
;
[ODBC Data Sources]
wisenet = PostgreSQL

[wisenet]
driver = /www/lib/libpsqlodbc.so
server = localhost
port = 5432
dbase = wisenet
username = nobody
passwd = nobody
serverType = Postgresql
readonly = no
trace = yes
tracefile = /tmp/sql.log
DebugFile = /tmp/sqldebug.log
---end

Does anybody know, how to make it work? Where did I make a mistake?

Przem

ps
followup to: comp.databases.postgresql.interfaces.odbc

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Peltonen 2001-04-20 13:05:36 Re: 7.1 rpm problem
Previous Message Pimenov Yuri 2001-04-20 12:39:13 Re: locale & glibc 2.2.2

Browse pgsql-odbc by date

  From Date Subject
Next Message Rob Yampolsky 2001-04-20 18:01:45 Re: How to configure iodbc access to local postgres db?
Previous Message Dmitry Seleznev 2001-04-20 11:52:08