Re: Persistent Connects (pg_pconnect)

Поиск
Список
Период
Сортировка
От Luca Pregliasco
Тема Re: Persistent Connects (pg_pconnect)
Дата
Msg-id 3A36B9D0.AC0BFEBD@apuanet.bicnet.it
обсуждение исходный текст
Ответ на Re: Persistent Connects (pg_pconnect)  (Colleen Williams <colleen@digital-arts.co.uk>)
Список pgsql-sql
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


В списке pgsql-sql по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: SQL parse error
Следующее
От: "Nikhil G. Daddikar"
Дата:
Сообщение: Decimal vs.Numeric vs. Int & type for OID