Re: CGI program cannot access database

From: Steven Klassen <sklassen(at)commandprompt(dot)com>
To: Samik Raychaudhuri <samik(at)freeshell(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: CGI program cannot access database
Date: 2004-10-08 15:17:07
Message-ID: 20041008151707.GB7452@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

* Samik Raychaudhuri <samik(at)freeshell(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Browne 2004-10-08 15:36:53 Re: Current wisdom wrt fsm on 8.0
Previous Message Tom Lane 2004-10-08 15:05:16 Re: pg_restore -l and schema name