php - Laravel4.2&mongoDB. Class 'MongoClient' not found when try to call command from command line -
as topic title. work cron service execute artisan command every minute. have problem when try execute command via terminal debuging. got error class 'mongoclient' not found.
so try simple query in laravel route
$m = new mongoclient('mongodb://localhost:27017'); $db = $m->rootan; print_r($db) ; $result = $db->campaigns->findone(); print_r($result) ;
i got result no error perfectly.
so question why error when execute command terminal. problem permission?
sorry english.
ps. use ubuntu14.04 laravel4.2 , mongodb3
Comments
Post a Comment