We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Phalcon 3 + PHP7 not work with old ODM — Phalcon 3.0.0 documentation

I have tried to use Phalcon + PHP7 and Mongodb, following this tutorial : https://docs.phalcon.io/en/latest/reference/odm.html

But the script not work when i tried to create user function.

Is there anybody use Phalcon 3 + PHP7 and MongoDB yet ?

edited Aug '16

Works for me with new MongoDB php module and this extension: https://github.com/phalcon/incubator/tree/master/Library/Phalcon/Db/Adapter#mongodbclient



6.6k

what should i do in config file please :

I use mongoDB in mlab.com

'mongo' => [ 'adapter' => 'mongo', 'host' => 'xxxxxxx.mlab.com:11715', 'username' => 'xxxxxx', 'password' => 'xxxxxxxx', 'dbname' => 'dbname', 'charset' => 'utf8', ],

Is this right ?


6.6k

I got thiss error :

Notice: Undefined property: Phalcon\Config::$mongo in C:\xampp\htdocs\idoc\config\services.php on line 142

Notice: Trying to get property of non-object in C:\xampp\htdocs\idoc\config\services.php on line 142

Notice: Undefined property: Phalcon\Config::$mongo in C:\xampp\htdocs\idoc\config\services.php on line 143

Notice: Trying to get property of non-object in C:\xampp\htdocs\idoc\config\services.php on line 143 Failed to parse MongoDB URI: 'mongodb://'