Reputation: 7525
I am using Yii & mongodb(YiiMongoDbSuite extension), and created a console application. But its not working giving the error,
include(Mongo.php): failed to open stream: No such file or directory in file /var/www/yii/framework/YiiBase.php at line 418
I have configure the console.php to include all the modules, components and models. But still giving the error.
Upvotes: 3
Views: 2086
Reputation: 46
Open path : /etc/php5/cli then open php.ini and add extension extension=mongo.so restart apache service your issue is resolved.
Upvotes: 0
Reputation:
Mongo
class is a part of php mongo extension, it is not related to YiiMongoDbSuite. This means that mongo php extension is not loaded. Make sure, that your cli php is using proper (or any) php.ini
. You might have defined ini path in httpd.conf
, but it is used only by apache.
Easiest fix is to drop php.ini
into your php folder.
Upvotes: 4