{"action":"created","issue":{"url":"https://api.github.com/repos/mongodb/mongo-php-library/issues/83","labels_url":"https://api.github.com/repos/mongodb/mongo-php-library/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/mongodb/mongo-php-library/issues/83/comments","events_url":"https://api.github.com/repos/mongodb/mongo-php-library/issues/83/events","html_url":"https://github.com/mongodb/mongo-php-library/issues/83","id":124757860,"number":83,"title":"Segmentation fault 11 using $driverOptions in Manager::__construct","user":{"login":"acim","id":2791202,"avatar_url":"https://avatars.githubusercontent.com/u/2791202?v=3","gravatar_id":"","url":"https://api.github.com/users/acim","html_url":"https://github.com/acim","followers_url":"https://api.github.com/users/acim/followers","following_url":"https://api.github.com/users/acim/following{/other_user}","gists_url":"https://api.github.com/users/acim/gists{/gist_id}","starred_url":"https://api.github.com/users/acim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acim/subscriptions","organizations_url":"https://api.github.com/users/acim/orgs","repos_url":"https://api.github.com/users/acim/repos","events_url":"https://api.github.com/users/acim/events{/privacy}","received_events_url":"https://api.github.com/users/acim/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-04T13:20:46Z","updated_at":"2016-01-05T14:24:23Z","closed_at":null,"body":"I am trying to do this:\r\n\r\n```php\r\n            $context = stream_context_create(['ssl' => [\r\n                'allow_self_signed' => true,\r\n                'verify_peer'       => false,\r\n                'verify_peer_name'  => false,\r\n                'verify_expiry'     => false]\r\n            ]);\r\n\r\n            $manager = new Manager('mongodb://127.0.0.1:27017', ['ssl' => true], ['context' => $context]);\r\n\r\n            $collection = new Collection($manager, 'dbName.collectionName');\r\n\r\n            $data = $collection->findOneAndUpdate(\r\n                ['timestamp' => ['$lt' => time() - 60]],\r\n                ['$set' => ['in_process' => true]],\r\n                ['sort' => ['timestamp' => 1]]\r\n            );\r\n```\r\n\r\nbut I get \"Segmentation fault: 11\". The actual crash is at Collection.php:525\r\n\r\n```php\r\n$server = $this->manager->selectServer(new ReadPreference(ReadPreference::RP_PRIMARY));\r\n```\r\n\r\nOSX El Capitan\r\nHomebrew PHP 5.6.16\r\nHomebrew mongodb 1.1.1\r\nPHP library 1.0.0-beta2\r\n\r\nAm I doing something wrong or is this maybe Homebrew specific? I haven't tried the PECL library directly."},"comment":{"url":"https://api.github.com/repos/mongodb/mongo-php-library/issues/comments/169014312","html_url":"https://github.com/mongodb/mongo-php-library/issues/83#issuecomment-169014312","issue_url":"https://api.github.com/repos/mongodb/mongo-php-library/issues/83","id":169014312,"user":{"login":"david-fairbanks42","id":2654281,"avatar_url":"https://avatars.githubusercontent.com/u/2654281?v=3","gravatar_id":"","url":"https://api.github.com/users/david-fairbanks42","html_url":"https://github.com/david-fairbanks42","followers_url":"https://api.github.com/users/david-fairbanks42/followers","following_url":"https://api.github.com/users/david-fairbanks42/following{/other_user}","gists_url":"https://api.github.com/users/david-fairbanks42/gists{/gist_id}","starred_url":"https://api.github.com/users/david-fairbanks42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-fairbanks42/subscriptions","organizations_url":"https://api.github.com/users/david-fairbanks42/orgs","repos_url":"https://api.github.com/users/david-fairbanks42/repos","events_url":"https://api.github.com/users/david-fairbanks42/events{/privacy}","received_events_url":"https://api.github.com/users/david-fairbanks42/received_events","type":"User","site_admin":false},"created_at":"2016-01-05T14:24:23Z","updated_at":"2016-01-05T14:24:23Z","body":"I'm getting the same problem. The entire MEMP is installed with homebrew just days ago.\r\n\r\nOSX El Capitan\r\nHomebrew PHP 5.6.16\r\nHomebrew mongodb 1.0.1\r\nPHP library 1.0.0-beta2\r\n\r\nJust trying some very simple test lines\r\n\r\n    $manager = new MongoDB\\Driver\\Manager(\"mongodb://127.0.0.1:27017\");\r\n    $campTable = new MongoDB\\Collection($manager, \"test.camps\");\r\n    // seems to work until here\r\n    $campTable->InsertOne(array(\r\n     'campId' => 1001,\r\n     'name' => 'Test Camp 1',\r\n     'sourceId' => 1,\r\n     'cpc' => 0.025\r\n    ));\r\n\r\nThis same code was working on my other system that was installed without homebrew and used PHP library 1.0.0-beta1. I will try beta 2 later today to rule that out."}}