ID: 33785
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Reproducible crash
Operating System: gentoo linux
PHP Version: 5.1.0b3
New Comment:
the "exit;" was just for debugging, that's not what makes the script
halt ;) sorry for that
Previous Comments:
------------------------------------------------------------------------
[2005-07-20 12:50:24] [EMAIL PROTECTED]
Description:
------------
the code is self-explaining,
i am running mod_php 5.1.0b3 with apache 1.3.33 and postgresql 8.0.1
Reproduce code:
---------------
<pre><?php
$db = new PDO("pgsql:host=localhost dbname=foo user=bar password=''");
// need to select at least 2 rows to make it crash
$query = 'SELECT pcontact_id FROM pcontacts LIMIT 2';
// works fine
$s = $db->query($query);
$s->setFetchMode(PDO_FETCH_ASSOC);
foreach($s AS $row)
var_dump($s);
// segfaults
foreach($db->query($query, PDO_FETCH_LAZY) AS $row)
var_dump($row);
exit;
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33785&edit=1