php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70679 Driver not accepting authMechanism
Submitted: 2015-10-09 14:26 UTC Modified: -
Votes:5
Avg. Score:4.2 ± 1.0
Reproduced:4 of 5 (80.0%)
Same Version:3 (75.0%)
Same OS:1 (25.0%)
From: jfha73 at gmail dot com Assigned:
Status: Open Package: mongo (PECL)
PHP Version: 5.6.14 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
3 + 23 = ?
Subscribe to this entry?

 
 [2015-10-09 14:26 UTC] jfha73 at gmail dot com
Description:
------------
Hey guys

I'm trying to connect to Mongolab using your driver, according to their docs, with the latest version they enabled Authentication Mechanism to use SCRAM-SHA-1

But when I add it to the options, it doesn't take it.

---
From manual page: http://www.php.net/mongo.connecting.auth
---


Test script:
---------------
new MongoClient("mongodb://username:password!@ds012634.mongolab.com:12634/mydb", array ("authMechanism" => "SCRAM-SHA-1"));

Expected result:
----------------
Connect

Actual result:
--------------
Authentication failed

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-05-10 09:42 UTC] php at genjo dot fr
I think SCRAM-SHA-1 mechanism is not yet supported by PHP, and previous MongoDB-CR authentication method has been removed in Mongo 3.0.0 version.

http://php.net/manual/en/mongoclient.construct.php (PECL deprecated extension)
http://php.net/manual/en/mongodb-driver-manager.construct.php
https://jira.mongodb.org/browse/SERVER-17459

You have to add MONGODB-CR to credentials or to downgrade to previous version 3 : https://jira.mongodb.org/browse/SERVER-17459
 [2016-05-10 09:48 UTC] php at genjo dot fr
This mechanism is supported with 1.6 PHP driver :
http://pecl.php.net/package/mongo
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 02:01:30 2024 UTC