ID: 37889
Updated by: [EMAIL PROTECTED]
-Summary: Segfault
Reported By: kevin at littletrader dot net
-Status: Open
+Status: Assigned
Bug Type: SPL related
-Operating System: Linux
+Operating System: *
-PHP Version: 5.1.5CVS
+PHP Version: 5.1.5
-Assigned To:
+Assigned To: helly
Previous Comments:
------------------------------------------------------------------------
[2006-06-22 16:18:01] kevin at littletrader dot net
Description:
------------
Segfault:
[Thu Jun 22 18:34:02 2006] [notice] child pid 6222 exit signal
Segmentation fault (11)
Reproduce code:
---------------
<?php
$sql = "SELECT * FROM news ORDER BY nid DESC LIMIT 1";
try{
$dbh = new PDO("mysql:host=$dbhost;dbname=$dbname", $username,
$password);
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$stmt = $dbh->prepare($sql);
$stmt->execute();
$result = $stmt->setFetchMode(PDO::FETCH_ASSOC);
$it = new IteratorIterator($stmt);
foreach($it as $resultSet)
{
echo $resultSet->key();
}
}
catch(PDOException $e)
{
echo 'Unable to select latest record'.$e->getMessage();
}
?>
Actual result:
--------------
[Thu Jun 22 18:34:02 2006] [notice] child pid 6222 exit signal
Segmentation fault (11)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37889&edit=1