getting "fe_setauthsvc: invalid name" error

Поиск
Список
Период
Сортировка
От Midwest Online
Тема getting "fe_setauthsvc: invalid name" error
Дата
Msg-id 35F8B0F4.148A0C4@midwestonline.com
обсуждение исходный текст
Ответы Re: [INTERFACES] getting "fe_setauthsvc: invalid name" error  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Ivo Simicevic
Дата:
Сообщение: ODBC problem using Visual Cafe 2.5
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [INTERFACES] getting "fe_setauthsvc: invalid name" error