intekhabrizvi / Codeigniter-mongo-library

MongoDB Library for Codeigniter with advance features like aggregation, journal, write concern and query profiling

Home Page:http://intekhabrizvi.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Connection error to /tmp/mongodb-27017.sock

verkhoumov opened this issue · comments

In current version PORT is required. When it is necessary to be connected to /tmp/mongodb-27017.sock if i typed PORT, i see PHP error that file /tmp/mongodb-27017.sock:27017 is undefined.

Your dns-constructor:
$dns = "mongodb://{$this->hostname}:{$this->port}/{$this->database}";

You shall add additional check on empty of PORT. For this purpose it is necessary to change functions: prepare & connect.

Checks for username and password must be changed too.