ID:               37889
 Updated by:       [EMAIL PROTECTED]
 Reported By:      kevin at littletrader dot net
-Status:           Assigned
+Status:           Feedback
 Bug Type:         SPL related
 Operating System: *
 PHP Version:      5.1.5
 Assigned To:      helly
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.




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

Reply via email to