Hi all,
after upgrading to version 2.6 I have the following problem:
Any mongoDB::execute request I make to 2.6 end in an error "not authorized". I already searched in Google and read the documentation for 2.6 but I don't find any reason for that. The same requests to 2.4 are all successfull...
Here are is an example:
$m = new MongoClient("mongodb://admin:pass@localhost");
$testdb = $m->test;
$response = $testdb->execute("function() { return 'Hello, world!'; }");
print_r($response);
The response is:
Array ( [ok] => 0 [errmsg] => not authorized on local to execute command { $eval: CodeWScope( function() { return 'Hello, world!'; }, {}), args: [] } [code] => 13 )
I already checked the roles of the user, which is the superuser role "root" - so what I'm doing wrong? Do I need to add some new roles for 2.6 to use the execute request from the php driver?
Thanks for any help and regards
Rene