pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: babak badaei <badaei@yahoo.com>
To: Gavin M. Roy <gmr@ehpg.net>
Cc: pgsql-php@postgresql.org
Subject: Re: Postgres 8.1.4 + PHP, hangs when querying more than 16 records!
Date: Thu, 31 Aug 2006 13:07:59 -0700 (PDT)
Message-ID: <20060831200759.30310.qmail@web55213.mail.re4.yahoo.com> (raw)
In-Reply-To: <1410D5D8-73A1-43F3-92B3-36F7AFAAE092@ehpg.net>

Yeah, I just dumped the box completely. It was too frustrating. I'm starting over with FreeBSD this time on new hardware. 

Thanks for your help and suggestions!

----- 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 12:33:24 PM
Subject: Re: [PHP] Postgres 8.1.4 + PHP, hangs when querying more than 16 records!

Wow I'd say that something is terribly wrong with your machine, or it's install of pgsql, other than running fedora ;-).  Out of curiosity what's the row size?  how many fields and what's the schema look like?






On Aug 31, 2006, at 9:29 AM, babak badaei wrote:

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

view thread (9+ messages)

Message-ID: <20060831200759.30310.qmail@web55213.mail.re4.yahoo.com>
Permalink:  ../20060831200759.30310.qmail@web55213.mail.re4.yahoo.com/
Also on:    postgresql.org/message-id/20060831200759.30310.qmail@web55213.mail.re4.yahoo.com

 · 

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: badaei@yahoo.com, gmr@ehpg.net
  Subject: Re: Postgres 8.1.4 + PHP, hangs when querying more than 16 records!
  In-Reply-To: <20060831200759.30310.qmail@web55213.mail.re4.yahoo.com>
  References: <1410D5D8-73A1-43F3-92B3-36F7AFAAE092@ehpg.net> <20060831200759.30310.qmail@web55213.mail.re4.yahoo.com>

* 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