[DOCS-8719] SSL not mentioned in PHP driver docs Created: 31/Aug/16  Updated: 11/Jan/17  Resolved: 17/Nov/16

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

Type: Improvement Priority: Major - P3
Reporter: Andrew Davidson Assignee: Jeremy Mikola
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to PHPLIB-195 Document SSL context options for Mong... Closed
is related to DOCS-8367 php mongodb authentication Closed
is related to PHPC-696 Verify SSL peer verification for PHP ... Closed
is related to PHPC-700 Document SSL context options for Mong... Closed
Participants:
Days since reply: 7 years, 12 weeks, 6 days ago
Story Points: 1

 Description   

In http://mongodb.github.io/mongo-php-library/
notice that there are no results for http://mongodb.github.io/mongo-php-library/search.html?q=ssl

We should ensure that driver documentation has an example connection using SSL (particularly with MongoDB Atlas requiring it)



 Comments   
Comment by Allison Reinheimer Moore [ 17/Nov/16 ]

Published! https://docs.mongodb.com/php-library/master/reference/method/MongoDBClient__construct/#examples

Comment by Githook User [ 17/Nov/16 ]

Author:

{u'username': u'jmikola', u'name': u'Jeremy Mikola', u'email': u'jmikola@gmail.com'}

Message: DOCS-8719: MongoDB\Client example for SSL and auth
Branch: master
https://github.com/mongodb/mongo-php-library/commit/ef3bba89849a3268d5a8e3d76e942e3f66d3a786

Comment by Jeremy Mikola [ 16/Nov/16 ]

https://github.com/mongodb/mongo-php-library/pull/281

allison.moore: Please take a look at my DOCS-8719 commit in the above PR. There's also another unrelated question for you in that PR.

andrew.davidson, pavel.duchovny: Something I noticed on https://docs.atlas.mongodb.com/driver-connection/ is that each URI includes both authSource=admin and /admin in the URI. I believe that is redundant for most drivers, since authSource determines the database to authenticate against. The /admin path, which follows the host list would only otherwise be used to determine the default database for the driver. I'm not sure which drivers actually support that (kay.kim mentioned Ruby), but PHP certainly does not have the notion of a "default database" like the shell.

Comment by Jeremy Mikola [ 15/Nov/16 ]

The example in the PHP driver for atlas is actually for the legacy driver Mongo and it contradicts the requirement for Atlas to use the mongodb driver (1.1 and above).

pavel.duchovny: The example you cited is actually the PHP library (PHPLIB in JIRA), which is exactly what we want folks to use. It's the pure-PHP package that wraps the "mongodb" extension (PHPC and HHVM projects in JIRA). The PHP library documentation is hosted at: https://docs.mongodb.com/php-library/

The legacy driver's class would be MongoClient, not MongoDB\Client. I would suggest leaving the Atlas code example as-is, and adding a link that it also requires PHP library 1.0+, in addition to "mongodb-1.1". We explain the legacy and new drivers in the driver compatibility reference, which is already linked to.

To build upon what allison.moore said, I'm currently fixing a slew of PHPLIB documentation issues in PR #281 and will include an SSL connection in the examples for MongoDB\Client usage.

Comment by Allison Reinheimer Moore [ 15/Nov/16 ]

andrew.davidson pash10g@gmail.com Jeremy Mikola is working on this in PHPLIB-195, which is currently in Code Review, so things are progressing on this front. I'm leaving this ticket open to address any work I'll need to do for this (possibly adding a tutorial), but the options will be documented once PHPLIB-195 is merged.

I'll move this ticket up in my queue as well. Thanks!

Comment by Pavel Duchovny [ 15/Nov/16 ]

andrew.davidson , The example in the PHP driver for atlas is actually for the legacy driver Mongo and it contradicts the requirement for Atlas to use the mongodb driver (1.1 and above).

I think we should address this quickly especially for Atlas users who are already opening tickets with some confusion around this area.

PHPC-696 shows how the configuration should look like in the current Driver.

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