From: Midwest Online <mo@midwestonline.com>
To: pgsql-interfaces@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: getting "fe_setauthsvc: invalid name" error
Date: Fri, 11 Sep 1998 00:11:17 -0500
Message-ID: <35F8B0F4.148A0C4@midwestonline.com> (raw)
Hi people,
I'm using some c++ code to connect to a postgresql 6.3.2 database.
I need to use this for a CGI application on a website we maintain.
It runs perfectly from the command line on my linux machine, and also
from the command line on the BSDI machine we use for a virtually-hosted
server.
The problem I'm having is when I attempt to execute it as a CGI app from
the cgi-bin directory on our server. Here's the code:
----------------------------------------------------------------------------
#include <iostream.h>
#include <libpq++.h>
#include <stdlib.h>
main()
{
cout << "Content-type: text/plain\n\n";
cout << "Trying to connect ..." << endl;
char* dbName = "molinks";
PgEnv Env;
Env.Host("peculiarweb.com");
// Env.Port("");
// Env.Auth("");
cout << "Env.Auth = " << Env.Auth() << endl;
cout << "Env.Host = " << Env.Host() << endl;
cout << "Env.Port = " << Env.Port() << endl;
cout << "Env.Option = " << Env.Option() << endl;
cout << "Env.TTY = " << Env.TTY() << endl;
// Open the connection to the database and make sure it's OK
PgDatabase data(Env, dbName);
if ( data.ConnectionBad() ) {
cout << "Connection was unsuccessful..." << endl
<< "Error message returned: " << data.ErrorMessage() << endl;
return 1;
}
else
cout << "Connection successful..." << endl;
----------------------------------------------------------------------------
When I try to run it as a CGI app from the web server, I get the
following error:
----------------------------------------------------------------------------
Trying to connect ...
Env.Auth =
Env.Host = peculiarweb.com
Env.Port =
Env.Option =
Env.TTY =
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?
----------------------------------------------------------------------------
Belinda & Clint Forgy
Midwest Online PeculiarWeb Internet Designs
http://www.midwestonline.comhttp://www.peculiarweb.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: mo@midwestonline.com, pgsql-hackers@postgresql.org
Subject: Re: getting "fe_setauthsvc: invalid name" error
In-Reply-To: <35F8B0F4.148A0C4@midwestonline.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox