[DOCS-7545] mongodb-php-driver with oldest php driver Created: 31/Mar/16  Updated: 03/Nov/17  Resolved: 31/Mar/16

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Unassigned
Resolution: Done Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

PHP 5.6 OSX 10.11

Location: https://docs.mongodb.org/ecosystem/drivers/php/
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Firefox/45.0
Referrer: https://www.google.it
Screen Resolution: 1440 x 900
repo: docs-ecosystem
source: drivers/php


Participants:
Days since reply: 7 years, 45 weeks, 6 days ago

 Description   

hi,

I try used PHP mongodb drive with old mongo driver - I have use all two.
but with:
$manager = new \MongoDB\Driver\Manager("mongodb://127.0.0.1:27017/ca_beta");
$query = new \MongoDB\Driver\Query([], []);
$cursor = $manager->executeQuery("ca_beta.courses", $query);

I always return:
segmentation fault.

I recompiled driver with 1 work around:
php_mongo.c:2499
FROM: PHP_MINIT(Cursor)(INIT_FUNC_ARGS_PASSTHRU);
TO: PHP_MINIT(CursorDB)(INIT_FUNC_ARGS_PASSTHRU);

Cursor.c:294
FROM: PHP_MINIT_FUNCTION(Cursor)
TO: PHP_MINIT_FUNCTION(CursorDB)

And now it's fine and I get cursor with array



 Comments   
Comment by Allison Reinheimer Moore [ 31/Mar/16 ]

Glad you were able to make things work for your use case!

We recommend using the mongodb extension with the PHP Library for new projects going forward. The legacy mongo driver is still maintained for bug and security fixes, but has been superseded by the new driver, so we won't be making any tweaks to the docs on this page. Thanks!

Generated at Thu Feb 08 07:54:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.