Re: Unable to connect to Postgresql

From: rob stone <floriparob(at)gmail(dot)com>
To: John Iliffe <john(dot)iliffe(at)iliffe(dot)ca>, Daniel Verite <daniel(at)manitou-mail(dot)org>
Cc: pgsql-general(at)postgresql(dot)org, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, Joe Conway <mail(at)joeconway(dot)com>
Subject: Re: Unable to connect to Postgresql
Date: 2017-04-10 23:06:46
Message-ID: 1491865606.6586.1.camel@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello John,

On Mon, 2017-04-10 at 16:23 -0400, John Iliffe wrote:
> On Monday 10 April 2017 11:53:35 Daniel Verite wrote:
> >       John Iliffe wrote:
> > > So, the problem is resolved, although I have no idea why it was
> > > necessary.
> > 
>

Good to hear.

> > 
>
> Yes, I will do that, but there are several hundred PHP web page
> scripts to 
> be updated.  Presumably if one script opens two different databases
> then 
> both of the pg_connect() instances will need to be updated.
>

Are you saying that every single PHP script has its own separate
routine to connect to the database?

We have just a single class to do connection stuff and the parameters
are held in pg_service.conf. That file has to be readable by Apache.
You just pass in an argument that represents the database to which you
want to connect, and it grabs host, port, etc. out of the service file.
All you have to do is keep the service file up-to-date.

Cheers,
Rob

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John Iliffe 2017-04-10 23:29:31 Re: Unable to connect to Postgresql
Previous Message Daniel Verite 2017-04-10 22:01:44 Re: Unable to connect to Postgresql