X-Original-To: pgsql-php-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 58EC79FB3E7 for ; Thu, 31 Aug 2006 13:29:38 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 12707-02 for ; Thu, 31 Aug 2006 13:29:31 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web55214.mail.re4.yahoo.com (web55214.mail.re4.yahoo.com [206.190.58.178]) by postgresql.org (Postfix) with SMTP id 55C639FB2FC for ; Thu, 31 Aug 2006 13:29:10 -0300 (ADT) Received: (qmail 97362 invoked by uid 60001); 31 Aug 2006 16:29:10 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=H0y5aiSuMCpKObbRgWnK/HLBBT0bAw/xkpi64dxJkyfk193ogacufC8M8nLY8gPf7FSXWVfAC6ONTX4Wv+mP3Q9E+CeZ7ebaWljyJFdmPL/9UjqhWChsOz29HocpCrA82YbxVhOQ5oYKPniwjMktYdIegjooaSLQH2EoIbDzfOk= ; Message-ID: <20060831162910.97360.qmail@web55214.mail.re4.yahoo.com> Received: from [72.134.0.217] by web55214.mail.re4.yahoo.com via HTTP; Thu, 31 Aug 2006 09:29:10 PDT Date: Thu, 31 Aug 2006 09:29:10 -0700 (PDT) From: babak badaei Reply-To: babak badaei Subject: Re: Postgres 8.1.4 + PHP, hangs when querying more than 16 records! To: "Gavin M. Roy" Cc: pgsql-php@postgresql.org In-Reply-To: <5807B3E2-F486-47CB-B8AB-5D20ABD6FD65@ehpg.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-198202980-1157041749=:97134" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.613 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, DNS_FROM_RFC_WHOIS, HTML_30_40, HTML_MESSAGE X-Spam-Level: ** X-Archive-Number: 200608/24 X-Sequence-Number: 3595 --0-198202980-1157041749=:97134 Content-Type: text/plain; charset=us-ascii Hello again; I just finished trying the method below with the same results. 16 records work, more than that it hangs!! Thanks for your help. Babak. ----- Original Message ---- From: Gavin M. Roy To: babak badaei Cc: pgsql-php@postgresql.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 > To: babak badaei > Cc: pgsql-php@postgresql.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: >> --------------------------------------------------------------------- >> ------------ >> > // 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'; > > > >> // 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 --0-198202980-1157041749=:97134 Content-Type: text/html; charset=us-ascii
Hello again; I just finished trying the method below with the same results. 16 records work, more than that it hangs!! Thanks for your help. Babak.

----- Original Message ----
From: Gavin M. Roy <gmr@ehpg.net>
To: babak badaei <badaei@yahoo.com>
Cc: pgsql-php@postgresql.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@gmail.com>
> To: babak badaei <badaei@yahoo.com>
> Cc: pgsql-php@postgresql.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

--0-198202980-1157041749=:97134--