Re: [GENERAL] Need help using PHP ODBC to connect Postgress 7.1.1

2001-05-17 Thread Brent R. Matzelle

--- Hiroshi Inoue [EMAIL PROTECTED] wrote:
 Allan Rafuse wrote:
  
  I'm having trouble setting up a remote Apache PHP webserver
 to connect to
  our postgres machine using ODBC.
  
 
 Are you using ~/.odbc.ini(user DSN) for odbc.ini ?
 Current psqlodbc driver doesn't understand system DSN.

System DSN works fine for me.

Brent

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



[GENERAL] Need help using PHP ODBC to connect Postgress 7.1.1

2001-05-16 Thread Allan Rafuse

I'm having trouble setting up a remote Apache PHP webserver to connect to
our postgres machine using ODBC.  

This is what I get when trying to connect with the odbc_connect statement:

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='panoramaSQL',server='',port='',dbase='',user='',passwd=''
  onlyread='',protocol='',showoid='',fakeoidindex='',showsystable=''
  conn_settings='',conn_encoding='OHTER'
  translation_dll='',translation_option=''
conn = 138389968, SQLConnect(DSN='panoramaSQL', UID='remotesite', 
PWD='password_is_set')
Global Options: Version='07.01.0005', 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_encoding='OHTER'
CONN ERROR: func=SQLConnect, desc='Error on CC_connect', errnum=101, errmsg='Could not 
connect to the server'

henv=138348392, conn=138389968, status=0, num_stmts=16
sock=138396432, stmts=138304368, lobj_type=-999
 Socket Info ---
socket=-1, reverse=0, errornumber=2, errormsg='Could not resolve hostname.'
buffer_in=138396472, buffer_out=138385616
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:
[PostgreSQL]
Debug=0
CommLog=1

odbc.ini:
;
;  odbc.ini
;
[ODBC Data Sources]
panoramaSQL = Connection to Panorama

[panoramaSQL]
Driver = /usr/local/pgsql/lib/libpsqlodbc.so
Servername=pgsq1.freeview.com
Username=modularwebsites
Password=test4sql
Database=worldofsoccer_com
Port=5432
ReadOnly = no
Trace = 1
TraceFile = /tmp/odbc.log

[ODBC]
InstallDir  = /usr/local/pgsql/lib


PHP Was compiled with: ./configure --with-apache=/usr/src/apache_1.3.12-ssl \
--with-mysql=/usr/local/mysql --enable-track-vars --with-imap 
--with-jpeg-dir=/usr/local/bin 
--with-gd=/usr/local --with-ttf --with-pgsql --with-iodbc

Apache Was Compiled with: 
./configure --with-layout=Apache --prefix=/usr/local/apache-ssl --enable-module=info
--enable-module=log_referer --enable-module=mime_magic --enable-module=mmap_static
--enable-module=status --activate-module=src/modules/php4/libphp4.a
--enable-module=rewrite

iODBC (libiodbc-2.50.3) Compiled with:
./configure  --prefix=/usr/local --with-iodbc-inidir=/etc

Postgres 7.1.1 Compiled with: 
./configure  --with-perl --enable-multibyte --enable-unicode-converstion --enable-odbc

Thank you for any help!!!
 -Allan


- Allan Rafuse -
Systems Administrator
Freeview Publishing Inc.
email: [EMAIL PROTECTED]
web: http://www.freeview.com



---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl