Hello,
I start working on CakePHP and MongoDB, and I'm not able to use your library correctly. It might be a mistake from me but still I prefer to ask if it's a well-know error.
I'm using last CakePHP 3.5 version (3.5.17)
When I go on URL "http://127.0.0.1/MyCakePHPApp/articles/" to list articles stored in MongoDB, it display following error :
"Call to undefined method Hayko\Mongodb\Database\Driver\Mongodb::prepare()
Error
An Internal Server Error Occurred"
Here is my code :
ArticlesController.php
// src/Controller/ArticlesController.php
namespace App\Controller;
class ArticlesController extends AppController {
public function index() {
$this->loadComponent('Paginator');
$articles = $this->Paginator->paginate($this->Articles->find());
$this->set(compact('articles'));
}
}
ArticlesTable.php :
use Hayko\Mongodb\ORM\Table;
class ArticlesTable extends Table {
}
Thanks in advanced for your help
Ahmad
Hello,
I start working on CakePHP and MongoDB, and I'm not able to use your library correctly. It might be a mistake from me but still I prefer to ask if it's a well-know error.
I'm using last CakePHP 3.5 version (3.5.17)
When I go on URL "http://127.0.0.1/MyCakePHPApp/articles/" to list articles stored in MongoDB, it display following error :
"Call to undefined method Hayko\Mongodb\Database\Driver\Mongodb::prepare()
Error
An Internal Server Error Occurred"
Here is my code :
ArticlesController.php
// src/Controller/ArticlesController.phpnamespace App\Controller;class ArticlesController extends AppController {public function index() {$this->loadComponent('Paginator');$articles = $this->Paginator->paginate($this->Articles->find());$this->set(compact('articles'));}}ArticlesTable.php :
use Hayko\Mongodb\ORM\Table;class ArticlesTable extends Table {}Thanks in advanced for your help
Ahmad