i added mongo,but it doesn't work
i add it to the config.hdf file,and restart hhvm, no erroe and no warning DynamicExtensions { mongo = /home/shiyongyong/ext/mongo.so } but the mongo class is still undefined
https://github.com/10gen-labs/mongo-hhvm-driver
This repository is experimental, and partially implemented, is WIP, give a try to https://github.com/mongofill/mongofill-hhvm
I have try it,built a file named mongo.so, and reconfig the config.hdf, hhvm - c config.hdf test.php.still tell me ,the mongo class is undefined. oh ,my god.
@laodalaoda520, try the mongofill extension linked above - it has a pure php and a php/c++ version. The pure php one can be used without having to compile any extension at all and can tell you whether it has the features you need for your application. The -hhvm one adds some performance improvements (e.g. BSON handling).
Dupe of #578
this was fixed in a commit 2 days ago in mongofill-hhvm, the build script was not injecting the php classes into the .so correctly. The fix in HEAD on mongofill-hhvm makes it work fine.
Note that hhvm does not seem to load extensions when running as sudo root, this may be a security thing.
i have try to update mongofill-hhvm.and rebuilt the mongo.so ,but it still not work @thawkins
Try running "make clean" in the mongofill-hhvm directory, then run build.sh again.
first,I run git remote update in the mongofill-hhvm directory; then , run make clean ; when the built end,I run the bin ,hhvm -c /etc/hhvm/config.hdf test.php; DynamicExtensions { mongo = /home/hhvm_ext/mongo.so } but,it still undefined; [Mon Apr 28 09:22:36 2014] [hphp] [19992:7f6a1dd1b400:0:000001] [] Fatal error: Class undefined: Mongo in /home/shiyongyong/ext/test.php on line 2 @thawkins
I kn8w this is a bit obvious, but did you remember to copy the new mongo.so to /home/hhvm_ext
yes, if i didn't ,the hhvm will not run; @thawkins
Mongo class is depracated try MongoClient.
Hi I am using mongo-hhvm-driver it is saying me Fatal error: Class undefined: MongoClient
and also when I am compiling mongofill
/root/hhvm/hhvm-mongodb/mongofill-hhvm/src/bson.cpp:3:0: /usr/local/include/bson.h:64:2: error: #error Must compile with c99 or define MONGO_HAVE_STDINT, MONGO_HAVE_UNISTD, MONGO_USE__INT64, or MONGO_USE_LONG_LONG_INT. #error Must compile with c99 or define MONGO_HAVE_STDINT, MONGO_HAVE_UNISTD, MONGO_USE__INT64, or MONGO_USE_LONG_LONG_INT. ^
this error