getting "fe_setauthsvc: invalid name" error - Mailing list pgsql-interfaces

From Midwest Online
Subject getting "fe_setauthsvc: invalid name" error
Date
Msg-id 35F8B0F4.148A0C4@midwestonline.com
Whole thread Raw
Responses Re: [INTERFACES] getting "fe_setauthsvc: invalid name" error
List 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

pgsql-interfaces by date:

Previous
From: Ivo Simicevic
Date:
Subject: ODBC problem using Visual Cafe 2.5
Next
From: Tom Lane
Date:
Subject: Re: [INTERFACES] getting "fe_setauthsvc: invalid name" error