|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-06-22 16:18 UTC] 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)
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 22:00:02 2025 UTC |
[New Thread -151095616 (LWP 12747)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -151095616 (LWP 12747)] 0xf626b618 in mysql_more_results () from /usr/local/apache/libexec/libphp5.so (gdb) bt #0 0xf626b618 in mysql_more_results () from /usr/local/apache/libexec/libphp5.so #1 0xf606155d in pdo_mysql_stmt_dtor (stmt=0x834d3c4) at /home/kevin/html/php/dev/php5.2-200606221430/ext/pdo_mysql/mysql_statement.c:71 #2 0xf605dc99 in free_statement (stmt=0x834d3c4) at /home/kevin/html/php/dev/php5.2-200606221430/ext/pdo/pdo_stmt.c:2225 #3 0xf605df5e in pdo_stmt_iter_dtor (iter=0x834e3c4) at /home/kevin/html/php/dev/php5.2-200606221430/ext/pdo/pdo_stmt.c:2308 #4 0xf60c8d6d in spl_dual_it_free_storage (_object=0x836768c) at /home/kevin/html/php/dev/php5.2-200606221430/ext/spl/spl_iterators.c:1447 #5 0xf621cdd8 in zend_objects_store_free_object_storage (objects=0xf64a4a18) at /home/kevin/html/php/dev/php5.2-200606221430/Zend/zend_objects_API.c:86 #6 0xf61f3a91 in shutdown_executor () at /home/kevin/html/php/dev/php5.2-200606221430/Zend/zend_execute_API.c:281 #7 0xf6200c99 in zend_deactivate () at /home/kevin/html/php/dev/php5.2-200606221430/Zend/zend.c:854 #8 0xf61bd0bc in php_request_shutdown (dummy=0x0) at /home/kevin/html/php/dev/php5.2-200606221430/main/main.c:1300 #9 0xf62639c7 in apache_php_module_main (r=0x833c6c4, display_source_mode=0) at /home/kevin/html/php/dev/php5.2-200606221430/sapi/apache/sapi_apache.c:59 #10 0xf62646d3 in send_php (r=0x833c6c4, display_source_mode=0, filename=0x833d264 "/home/kevin/html/news/index.php") at /home/kevin/html/php/dev/php5.2-200606221430/sapi/apache/mod_php5.c:665 #11 0xf626471b in send_parsed_php (r=0x833c6c4) at /home/kevin/html/php/dev/php5.2-200606221430/sapi/apache/mod_php5.c:680 #12 0x08069f94 in ap_invoke_handler () #13 0x0807f1ac in process_request_internal () #14 0x0807f20b in ap_process_request () #15 0x080760aa in child_main () #16 0x080762ad in make_child () #17 0x08076411 in startup_children () #18 0x08076aa7 in standalone_main () #19 0x080772bf in main ()