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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jfha73 at gmail dot com
New email:
PHP Version: OS:

 

 [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-2021 The PHP Group
All rights reserved.
Last updated: Sun Nov 28 18:03:14 2021 UTC