php - message class 'mongoclient' not found codeigniter -


i trying setup mongo db in codeigniter after doing setup when run controller getting error. have tried similler error on stackoverflow no luck. here error:

fatal error: class 'mongoclient' not found in /var/www/html/grant/application/libraries/mongo_db.php on line 216 php error encountered  severity: error  message: class 'mongoclient' not found  filename: libraries/mongo_db.php  line number: 216  backtrace: 

your mongo_db class expecting mongoclient class has been loaded , mongo_db trying instantiate it. question didn't include link mongo library using i'm unable debug further, here basic steps.

before loading mongo_db library try loading mongo_client

$this->load->library('mongo_client'); 

if libraries rely on composer autoloader make sure have included autoloader class somewhere in bootstrap or configuration

include 'vendor/autoload.php' 

if libraries rely on composer, may want check autoload make sure including libraries directory in class map:

{     "autoload": {         "classmap": ["application/libraries"]     } } 

if updated autoload configuration in composer.json file make sure run command

composer dump-autoload 

Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -