Edit report at https://bugs.php.net/bug.php?id=55120&edit=1
ID: 55120 User updated by: tl at jiujitsuforums dot com Reported by: tl at jiujitsuforums dot com Summary: MongoDB PHP driver, segfault if you dont rewind cursor first Status: Bogus Type: Bug Package: Unknown/Other Function Operating System: Linux version 2.6.18-194.3.1.el5 PHP Version: 5.3.6 Block user comment: N Private report: N New Comment: PLEASE DISREGARD. Tracked down the issue. May be related to a lot of others peoples issues when it comes to segfaults. I had TWO php installations. When running configure, it picked up the default php installation which is NOT used for my website. People need to be careful and call configure correctly using the path to their php install like this: ./configure --with-php-config=/blah/blah/php/bin/php-config Effectively was building the driver against one version of php and installing it to the extensions directory of a different php install. Previous Comments: ------------------------------------------------------------------------ [2011-07-03 13:42:27] fel...@php.net For Mongo PHP driver, report bug at https://jira.mongodb.org/browse/PHP ------------------------------------------------------------------------ [2011-07-03 13:38:46] tl at jiujitsuforums dot com Description: ------------ PHP version is actually 5.3.2 <-- did not show up in the list While querying MongoDB using php driver, simply iterating over a collection will sometimes cause a segfault in the php process if you dont first rewind the cursor. MongoDB version: 1.8 Mongo DB php driver version: 1.1.4-31 PHP version: 5.3.2 Test script: --------------- $collection=$mongodb->blanks; $cursor = $collection->find(); $cursor->rewind(); // REMOVE this and segfaults occur much of the time foreach ($cursor as $obj) { $blankId=$obj['blankId']; } Expected result: ---------------- Iterate over collection fine Actual result: -------------- segfault in php processi ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55120&edit=1