Bug #1631: pg_Fetch_Array causes segmentation fault with PostgreSQL 6.5
| From: | sbragion at email dot com | Date: | Wed, 30 Jun 1999 12:04:19 +0000 |
| Subject: | Bug #1631: pg_Fetch_Array causes segmentation fault with PostgreSQL 6.5 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-7868@lists.php.net to get a copy of this message | ||
From: sbragion@email.com
Operating system: Linux 2.0.36 Libc 5
PHP version: 3.0.11
PHP Bug Type: Reproduceable crash
Bug description: pg_Fetch_Array causes segmentation fault with PostgreSQL 6.5
Environment: PHP 3.0.11 as DSO module with imap and PostgreSQL support, Apache 1.3.6, PostgreSQL
6.5.
PHP causes segmentation faults when pg_Fetch_Array is used.
Code example:
<?php // PostgreSQL test
$DBHandle = pg_Connect("host=localhost user=pgsql password=pgsql dbname=pgsql");
$Result = pg_Exec($DBHandle,"select * from test00 where testo = 'Record modifica
to' order by posizione");
for($I=0; $I<pg_NumRows($Result); $I++)
{
$Data = pg_Fetch_Array($Result,$I);
echo "<p><code> $Data[0] $Data[1] $Data[2] $Data[3]
</code><p>";
}
pg_Close($DBHandle);
?>
This code works if I replace pg_Fetch_Array with pg_Fetch_Row.