pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chadwick Rolfs <cmr@shell.gis.net>
To: Chris Ruprecht <chrup999@yahoo.com>
Cc: PostGreSQL PHP Group <pgsql-php@postgresql.org>
Subject: Re: pg_pconnect - ??
Date: Mon, 28 Jan 2002 15:50:54 -0500 (EST)
Message-ID: <Pine.SOL.3.96.1020128154722.25035B-100000@shell.gis.net> (raw)
In-Reply-To: <p0510120cb87b23a62b3d@[192.168.0.6]>

Aside from Apache children, pconnect doesn't really have any advantage
over connect... straight from the php.net doc...
You can use $GLOBALS to pass connections instead of trying to use the
pconnect string over and over.

If you write a quick function _one_ function that checks to see if a
connection is made, and uses that resource - or makes a new one, then all
you should have to do is include() that function in each one of your
pages....

Do you need an example?  Send us one of yours, and we'll show you (at
least I will).  I'd like to see what exactly you're using the pconnect
for.

Regards,

On Mon, 28 Jan 2002, Chris Ruprecht wrote:

> Hi all,
> 
> I am under the assumtion that, when I do a pg_pconnect instead of a 
> pg_connect, the connection to the db I have established, can be used 
> by another PHP procedure. Somehow, I don't see this working the way I 
> expect it.
> When I initially connect with pconnect, I see a postgres session 
> staring up and everything works. The postgres process stays active 
> but when I pconnect again, a second process is started. I was 
> expecting that the same process from the first pconnect will be used. 
> At the end, I land up with a whole bunch of postgres client sessions 
> hanging around in the system, doing who knows what.
> 
> What am I missing (doing wrong) here?
> Postgres = 7.1.3, OS = Linux 2.4.9 (RedHat 7.2), PHP = 4.0.6, Apache 
> = 1.3.22, memory = plenty (768 MB)
> 
> Best regards,
> Chris
> -- 
> Chris Ruprecht
> Network grunt and bit pusher extraordinaíre
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> 

Chadwick Rolfs - cmr@gis.net
Cleveland State University - Student
Music Major - The Holden Arboretum Volunteer
Computer Programmer - Student Employee
--*I finally found powdered water;
I just can't figure out what to add to it*--




view thread (26+ messages)  latest in thread

Message-ID: <Pine.SOL.3.96.1020128154722.25035B-100000@shell.gis.net>
Permalink:  ../Pine.SOL.3.96.1020128154722.25035B-100000@shell.gis.net/
Also on:    postgresql.org/message-id/Pine.SOL.3.96.1020128154722.25035B-100000@shell.gis.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: cmr@shell.gis.net, chrup999@yahoo.com
  Subject: Re: pg_pconnect - ??
  In-Reply-To: <Pine.SOL.3.96.1020128154722.25035B-100000@shell.gis.net>
  References: <p0510120cb87b23a62b3d@[192.168.0.6]> <Pine.SOL.3.96.1020128154722.25035B-100000@shell.gis.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox