From: | Midwest Online <mo(at)midwestonline(dot)com> |
---|---|
To: | pgsql-interfaces(at)postgresql(dot)org |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | getting "fe_setauthsvc: invalid name" error |
Date: | 1998-09-11 05:11:17 |
Message-ID: | 35F8B0F4.148A0C4@midwestonline.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-interfaces |
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.com http://www.peculiarweb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas G. Lockhart | 1998-09-11 05:15:11 | Re: [HACKERS] more on int8 |
Previous Message | Vadim Mikheev | 1998-09-11 01:27:59 | Re: [HACKERS] pg_user crash |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 1998-09-11 14:16:37 | Re: [INTERFACES] getting "fe_setauthsvc: invalid name" error |
Previous Message | Ivo Simicevic | 1998-09-10 14:54:40 | ODBC problem using Visual Cafe 2.5 |