ID:               37889
 User updated by:  kevin at littletrader dot net
 Reported By:      kevin at littletrader dot net
-Status:           Feedback
+Status:           Open
 Bug Type:         SPL related
 Operating System: *
-PHP Version:      5.1.5
+PHP Version:      5.2.0-dev
 Assigned To:      helly
 New Comment:

[New Thread -151095616 (LWP 12720)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -151095616 (LWP 12720)]
0xf626b618 in mysql_more_results () from
/usr/local/apache/libexec/libphp5.so


Previous Comments:
------------------------------------------------------------------------

[2006-06-23 07:49:23] [EMAIL PROTECTED]

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.



------------------------------------------------------------------------

[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