|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: jfha73 at gmail dot com
New email:
PHP Version: OS:


 [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-2022 The PHP Group
All rights reserved.
Last updated: Wed Nov 30 10:03:44 2022 UTC