Re: CGI program cannot access database - Mailing list pgsql-general

From Steven Klassen
Subject Re: CGI program cannot access database
Date
Msg-id 20041008151707.GB7452@commandprompt.com
Whole thread Raw
In response to CGI program cannot access database  (Samik Raychaudhuri <samik@freeshell.org>)
Responses Re: CGI program cannot access database  (Michael Fuhr <mike@fuhr.org>)
Re: CGI program cannot access database  (Samik Raychaudhuri <samik@freeshell.org>)
List pgsql-general
* Samik Raychaudhuri <samik@freeshell.org> [2004-10-07 21:12:31 -0500]:

> I am trying to run a perl CGI program for accessing a database. The
> program runs fine from command prompt, producing expected
> output. But it gives errors while running as CGI.

Has this ever worked?

> $dbh=DBI->connect("dbi:Pg:dbname='samik';host='abc.org';port=5432","samik","xxxx");

It seems that machine can't resolve abc.org (although I can). The
format of your connect string is a little unorthodox, but it seems to
work in general.

What does 'dig abc.org' return on this machine?

--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Replication & Support Services, (503) 667-4564

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_restore -l and schema name
Next
From: Bruce Momjian
Date:
Subject: Re: Rollback on Error