Skip site navigation (1) Skip section navigation (2)

Re: PHP and persistent connections

From: GH <grasshacker(at)over-yonder(dot)net>
To:
Cc: "'pgsql-novice(at)postgresql(dot)org'" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: PHP and persistent connections
Date: 2000-11-24 09:00:20
Message-ID: 20001124030020.E32817@over-yonder.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-novice
On Fri, Nov 24, 2000 at 02:48:18PM +0800, some SMTP stream spewed forth: 
> 
> At 12:47 PM 11/24/00, GH wrote:
> >On Fri, Nov 24, 2000 at 03:17:59PM +1100, some SMTP stream spewed forth:
> > > Oh, and if you are using pg_close() I don't think it works
> > > in any currently released PHP4 versions. See:
> >
> >This seems to be true. I ran into some fun link errors while
> >connecting and disconnecting more than once in a script.
> 
>    This sounds disturbing!

Maybe it should, I thought it was. Who knows.
> 

>    How then should I go about closing persistent connections? Can I close 
> them at all?

You cannot, by design and purpose, close persistent connections.
You could kill the postgres backend, but that is not quite the same. ;-)

>    Would pg_close() work if I used it on non-persistent connections?

My experience has caused me to believe that no, it will not.
That is not final, as I do not have true proof.

> 
>    Thanks in advance,

No prob, we are here to benefit each other.

It seems like PHP would open other new connections using pg_connect(), 
but would not close them. Has anyone had experiences other than this?


gh

> 
> Mikah
> 

In response to

pgsql-novice by date

Next:From: GHDate: 2000-11-24 09:16:36
Subject: Re: Re: re : PHP and persistent connections
Previous:From: Ron ChmaraDate: 2000-11-24 07:52:34
Subject: Re: Re: re : PHP and persistent connections

pgsql-hackers by date

Next:From: GHDate: 2000-11-24 09:16:36
Subject: Re: Re: re : PHP and persistent connections
Previous:From: Andrew McMillanDate: 2000-11-24 08:50:32
Subject: Re: Import text field

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group