MongoDB driver not accessible from PHP on same server -
i'm experiencing problem mongodb php driver , it's connection actual mongodb on ubuntu 14.04 server.
i've installed per instructions (through pecl, added 'extension=mongodb.so' etc), , extension installed , loaded in phpinfo latest 1.2.8 version , extension_loaded('mongodb') returns true. i'm running php 5.6.30 , mongodb version on server 3.4.2
i'm trying connect port 27020 on server (found out it's listening 0.0.0.0 address instead of 127.0.0.1 mysql). after have started mongod this
mongod --port 27020 --dbpath /db/path --logpath /log/path/mongo.log.log --fork --bind_ip 0.0.0.0
and changed /etc/mongod.conf 's network interfaces to
# network interfaces net: port: 27017 bindip: 0.0.0.0
but still running mongo shell mongo --port 27020 gets me this
connecting to: mongodb://127.0.0.1:27020/
the problem empty object after running
$client = new mongodb\driver\manager("mongodb://0.0.0.0:27020/");
and, of course, means i'm not connected mongodb.
i have tried opening ports (27017 & 27020) led problems server , has not fixed connection problem.
does know if there's steps have missed or additional setup made @ server-side driver can communicate mongod process?
thanks lot in advance help
Comments
Post a Comment