I can not connect to MongoDb using PHP, the error I am getting is
Failed to connect to: 127.0.0.1:27017: Authentication failed on database 'abc' with username 'admin': auth fails
The code that I use to connect is:
<?php
try {
$server = new Mongo("mongodb://admin:admin@127.0.0.1:27017/abc");
} catch (Exception $e) {
echo $e->getMessage();
}
?>
I have also installed RockMongo which can connect to the database fine.
The control panel that I am using is: ispconfig.org, I have added port 27017 to the firewall via the control panel so it's passing trough.