-
-
Save jmikola/37b2fb5954d790b3b416 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Running in a separate terminal: mongobridge --port 27018 --dest localhost:27017 --delay 10 | |
// Executed as: php -n -d extension=mongodb.so segfault.php | |
print_r(get_loaded_extensions()); | |
$options = ['w' => 1, 'journal' => 0, 'connectTimeoutMS' => 1, 'socketTimeoutMS' => 1, 'wTimeoutMS' => 1]; | |
$manager = new MongoDB\Driver\Manager('mongodb://localhost:27018', $options); | |
try { | |
$cursor = $manager->executeQuery('test.foo', new MongoDB\Driver\Query(array())); | |
var_dump(iterator_to_array($cursor)); | |
} catch (\Exception $e) { | |
echo '<pre>'; | |
var_dump($e->getTraceAsString(), $e->getMessage()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment