mongodb with yii

Dear Experts,

I am using this library so as to use mongo db.

After I installed the pacage, I introduce a class like this

class User extends EMongoDocument

However, when I run user/create for my apps.

I found this warning:

include(Mongo.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory


408                 {

409                     foreach(self::$_includePaths as $path)

410                     {

411                         $classFile=$path.DIRECTORY_SEPARATOR.$className.'.php';

412                         if(is_file($classFile))

413                         {

414                             include($classFile);

415                             break;

416                         }

417                     }

418                 }

419                 else

420                     include($className.'.php');

421             }

422             else  // class name with namespace in PHP 5.3

423             {

424                 $namespace=str_replace('\\','.',ltrim($className,'\\'));

425                 if(($path=self::getPathOfAlias($namespace))!==false)

426                     include($path.'.php');

427                 else

428                     return false;

429             }

430             return class_exists($className,false) || interface_exists($className,false);

431         }

432         return true;

 /Applications/MAMP/htdocs/yii/framework/YiiBase.php(420): YiiBase::autoload(Mongo)

I found that this package did not include a class named Mongo but it is using the class to lead to this error.

I can hardly found documentation on how to use this library.

Can somebody help?



Have you imported this extension in your config file:

you should first download mongodb server , then install the mongo driver for php . and then the class Mongo is available to you :lol:

Thanks for your reply. Problem solved.

For those use Windows + Wamp + Yii + Mongodb, you can follow this tutos to install all you need :

Best regards,