Re: Postgres 8.1.4 + PHP, hangs when querying more than 16 records!

From: babak badaei <badaei(at)yahoo(dot)com>
To: "Gavin M(dot) Roy" <gmr(at)ehpg(dot)net>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: Postgres 8.1.4 + PHP, hangs when querying more than 16 records!
Date: 2006-08-31 16:15:27
Message-ID: 20060831161527.39807.qmail@web55213.mail.re4.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

Hi Gavid, Thanks, no I have not tried PDO but I have compiled 3 different versions of PHP from source with similar results as the 3 different versions from binary distribution. Same for Postgres (compiled from source and dropped-in binary stuff) for two different versions.

Thanks again! Babak.

----- Original Message ----
From: Gavin M. Roy <gmr(at)ehpg(dot)net>
To: babak badaei <badaei(at)yahoo(dot)com>
Cc: pgsql-php(at)postgresql(dot)org
Sent: Thursday, August 31, 2006 8:55:01 AM
Subject: Re: [PHP] Postgres 8.1.4 + PHP, hangs when querying more than 16 records!

Have you tried with pdo?

$pdo = new PDO('pgsql:host=localhost;dbname=database','web');
$query = $pdo->query('SELECT * FROM foobar;');
$query->execute();
$data = $query->fetchAll(PDO::FETCH_OBJ);
print_r($data);

And have you tried not using other peoples packages but downloading
the source and compiling it? I run PHP 5.1.4 and work with very
large data sets, though I've not upgraded to 5.1.6 yet.

Hope this helps,

Gavin

On Aug 31, 2006, at 12:42 AM, babak badaei wrote:

> Hi Chris, Run through the native client everything works fine. I
> know, its really strange. Any ideas?
>
> ----- Original Message ----
> From: Chris <dmagick(at)gmail(dot)com>
> To: babak badaei <badaei(at)yahoo(dot)com>
> Cc: pgsql-php(at)postgresql(dot)org
> Sent: Wednesday, August 30, 2006 11:42:01 PM
> Subject: Re: [PHP] Postgres 8.1.4 + PHP, hangs when querying more
> than 16 records!
>
> babak badaei wrote:
>> OS: Fedora Core 5
>> PHP: PHP 5.1.4, PHP 5.1.6, and PHP 4.4.4 (compiled with --with-
>> pgsql and install as binaries using YUM)
>> Postgres 8.1.4
>>
>> This scripts works:
>> ---------------------------------------------------------------------
>> ------------
>> <?php
>> // Connecting, selecting database
>> $dbconn = pg_connect("host=localhost dbname=database user=web")
>> or die('Could not connect: ' . pg_last_error());
>>
>> // Performing SQL query
>> $query = 'SELECT * FROM foobar limit 16';
>
> <snip>
>
>> // Performing SQL query
>> $query = 'SELECT * FROM foobar limit 17';
>
> That seems really weird.
>
> If you run those through psql natively what happens?
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: explain analyze is your friend

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

In response to

Browse pgsql-php by date

  From Date Subject
Next Message babak badaei 2006-08-31 16:29:10 Re: Postgres 8.1.4 + PHP, hangs when querying more than 16 records!
Previous Message Gavin M. Roy 2006-08-31 15:55:01 Re: Postgres 8.1.4 + PHP, hangs when querying more than 16 records!