pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Luca Pregliasco <upa@apuanet.bicnet.it>
To: pgsql-sql@postgresql.org
Subject: Re: Persistent Connects (pg_pconnect)
Date: Wed, 13 Dec 2000 00:50:40 +0100
Message-ID: <3A36B9D0.AC0BFEBD@apuanet.bicnet.it> (raw)
References: <4.3.2.7.2.20001128111923.00b3c008@192.168.1.253>

Colleen Williams wrote:

> However we had another problem, the solution with using pg_connect instead
> of pg_pconnect worked on DEV but not on PROD. We think it is to do with
> different PHP versions. DEV was using PHP4.0.1p2 and PROD was using
> PHP4.0.3p1. We think maybe there is a variable scoping problem PHP4.0.3p1.
> Perhaps PHP doesn't really work so well with object code and so we
> shouldn't be using object code.
> 
> I have used the following code to do the database connect in my db.inc. To
> make the code work in PROD I have had to make $connection a global variable
> (by uncommenting the commented lines) as although it would connect fine and
> return a valid connection index, the next time I went to fetch the query,
> postgres would return an 'invalid postgres resource link' error. However in
> DEV (PHP4.0.1p2) it was working fine - creating a new postgres resource
> when a new query object is created.
> 
> If you can see a bug in my code and it is not at all a PHP version problem
> OR if you can confirm it is a PHP version problem please let me know. I
> would like to know if I am just doing it all wrong.

We are having exactly the same problem, with exactly the same
configurations, and we also reached the conclusion about PHP not working
fine with variable scoping in objects.
The code you supplied in example is very similar to our source, this
also confirms our fears.
We are investigating every single difference between the two PHP
versions to figure out a serius fix.

bye

Luca Pregliasco
upa@apuanet.bicnet.it

IF Internet Farm S.p.A.
Via Dorsale 13 - 54100 Massa - Italia



view thread (8+ messages)

Message-ID: <3A36B9D0.AC0BFEBD@apuanet.bicnet.it>
Permalink:  ../3A36B9D0.AC0BFEBD@apuanet.bicnet.it/
Also on:    postgresql.org/message-id/3A36B9D0.AC0BFEBD@apuanet.bicnet.it

 · 

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-sql@postgresql.org
  Cc: upa@apuanet.bicnet.it
  Subject: Re: Persistent Connects (pg_pconnect)
  In-Reply-To: <3A36B9D0.AC0BFEBD@apuanet.bicnet.it>
  References: <4.3.2.7.2.20001128111923.00b3c008@192.168.1.253> <3A36B9D0.AC0BFEBD@apuanet.bicnet.it>

* 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