At the time of this writing, HHVM does not have a package manager for extensions. Download the latest driver from » GitHub. Alternatively, you may clone the repository to build the latest source code:
$ git clone https://github.com/mongodb/mongo-hhvm-driver.git $ cd mongo-hhvm-driver $ git submodule sync && git submodule update --init
configure files for the bundled libraries. For this
this to work, you need to have the
libtool packages installed (e.g.
$ cd libbson; ./autogen.sh; cd .. $ cd libmongoc; ./autogen.sh; cd ..
Build and install the driver by running:
$ hphpize $ cmake . $ make -j 5 $ sudo make install
hphpizecommand is not available, you will need to either compile HHVM from source or install the
hhvm-devpackage (e.g. through
The last step will report where mongodb.so has been installed, similar to:
Add the following line to your php.ini file (usually found in "/etc/hhvm"):