#33785 [Opn]: pdo-pgsql crashes by PDO_FETCH_LAZY attribute

From: Date: Wed, 20 Jul 2005 10:51:20 +0000
Subject: #33785 [Opn]: pdo-pgsql crashes by PDO_FETCH_LAZY attribute
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-82202@lists.php.net to get a copy of this message
ID: 33785 User updated by: bs@php.net Reported By: bs@php.net 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] bs@php.net 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

« previous php.bugs (#82202) next »