I use this config to connect mongodb
$di->set('mongo', function() use ($config) { $mongo = new MongoClient(); return $mongo->selectDb("test"); }, true);
but I'm still get error 500 when use this connect. My mongo is success connect use command 'mongo' in terminal I use this config to connect mongodb.