-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.1.2
-
Component/s: None
-
None
From mongodb/mongo-php-library#83:
What I have found out, if I execute any method on Collection object within containers closure, this works no problem This is the original code (League Container service provider):
$this->getContainer()->add('mongo-collection', function () { $context = stream_context_create(['ssl' => [ 'allow_self_signed' => true, 'verify_peer' => false, 'verify_peer_name' => false, 'verify_expiry' => false] ]); $manager = new Manager('mongodb://127.0.0.1:27017', ['ssl' => true], ['context' => $context]); $collection = new Collection($manager, 'dbName.collectionName'); return $collection; });And if I add:
$collection->count();right before the return, it works. If I comment it out, I get segfault. I have also tried other methods like findOne() and it again works.
- is related to
-
CDRIVER-1209 _mongoc_cluster_auth_node_x509 segfault when failing to find username
- Closed
- related to
-
PHPC-677 Keep mongo_ssl_opt_t.pem_file valid for life of mongoc_client_t
- Closed
- links to