You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to setup MongoDB using this package and it's ODM. Currently everything seems to work except the instantiation of models extending the \Phalcon\Mvc\MongoCollection class.
My services.php:
use Phalcon\Db\Adapter\MongoDB\Client as MongoClient;
use Phalcon\Mvc\Collection\Manager;
//MongoDB Database
$di->set('mongo', function () {
$mongo = new MongoClient('mongodb://' . getenv('MONGODB_HOST') . ':' . getenv('MONGODB_PORT'));
return $mongo->selectDatabase(getenv('MONGODB_NAME'));
});
//Collection Manager
$di->set('collectionManager', function () {
return new Manager();
});
My Pages.php model:
class Pages extends \Phalcon\Mvc\MongoCollection
{
public function getSource(){
return 'pages';
}
}
When I try to do the following, my page results in a The connection was reset error and child pid <id> exit signal Segmentation fault (11) notice in the Apache logs:
$pages = new Pages();
OR
Pages::find();
However, I can do $mongo->listDatabases() and get the following result:
The text was updated successfully, but these errors were encountered:
dfsoeten
changed the title
Segmentation Fault when using find() or creating instance of model
Segmentation Fault when using find() or creating instance of model
Feb 4, 2019
I'm trying to setup MongoDB using this package and it's ODM. Currently everything seems to work except the instantiation of models extending the
\Phalcon\Mvc\MongoCollection
class.My
services.php
:My
Pages.php
model:When I try to do the following, my page results in a
The connection was reset
error andchild pid <id> exit signal Segmentation fault (11)
notice in the Apache logs:OR
However, I can do
$mongo->listDatabases()
and get the following result:The MongoDB PHP Driver also seems to work:
Details
The text was updated successfully, but these errors were encountered: