|  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: -
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
Have you experienced this issue?
Rate the importance of this bug to you:

 [2015-10-09 14:26 UTC] jfha73 at gmail dot com
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:

Test script:
new MongoClient("mongodb://username:password!", array ("authMechanism" => "SCRAM-SHA-1"));

Expected result:

Actual result:
Authentication failed


Add a Patch

Pull Requests

Add a Pull Request


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. (PECL deprecated extension)

You have to add MONGODB-CR to credentials or to downgrade to previous version 3 :
 [2016-05-10 09:48 UTC] php at genjo dot fr
This mechanism is supported with 1.6 PHP driver :
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 25 22:01:29 2024 UTC