Re: [INTERFACES] getting "fe_setauthsvc: invalid name" error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Midwest Online <mo(at)midwestonline(dot)com>
Cc: pgsql-interfaces(at)postgreSQL(dot)org, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] getting "fe_setauthsvc: invalid name" error
Date: 1998-09-11 14:16:37
Message-ID: 8763.905523397@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

Midwest Online <mo(at)midwestonline(dot)com> writes:
> Connection was unsuccessful...
> Error message returned: fe_setauthsvc: invalid name: , ignoring...
> Anybody have any clue why this happens, or what it means? Better yet,
> anybody know how to fix it?

The error message is pretty much useless --- it looks like the actual
error is being overwritten thanks to a bug in PgConnection::Connect().
You might try diking out the last seven lines of that routine (it's
in src/interfaces/libpq++/pgconnection.cc) and seeing if you get a
more useful message.

My guess is that the execution environment is different for your CGI
program, with respect to either username or lack of one of the
environment variables that libpq pays attention to (PGPORT, etc).

Another possibility is that the database server sees the connection
as being made from a different IP address than what you get from the
command line (I dunno enough about "virtual web servers" to know if that
would happen, but it seems possible), and the IP address is not one of
those listed as permitted to connect in the server's host authentication
file.

BTW, hackers: when I looked into pgconnection.cc, I was astonished
and dismayed by the number of instantly visible bugs. This code is in
*horrible* shape --- it's amazing it works at all. Someone is going to
have to adopt libpq++ and give it a close going-over.

regards, tom lane

Browse pgsql-hackers by date

  From Date Subject
Next Message Brook Milligan 1998-09-11 14:22:26 Re: [HACKERS] more on int8
Previous Message Bruce Momjian 1998-09-11 14:10:45 Re: [HACKERS] more on int8

Browse pgsql-interfaces by date

  From Date Subject
Next Message Trever Adams 1998-09-11 21:42:19 Authentication etc.
Previous Message Midwest Online 1998-09-11 05:11:17 getting "fe_setauthsvc: invalid name" error