I'm writing an C++ extension (dynamic load) for HHVM. I followed the instructions on this page: https://github.com/facebook/hhvm/wiki/Extension-API
which links to an example in: https://github.com/hhvm/extension-example
I compiled hhvm on Ubuntu 14.04 which took nearly 2 hours. Then I also compiled the example extension.
My question is, how to load it?
The information on the internet seems to be out-of-date or inconsistent. Anyway, I first tried to create /etc/hhvm/config.hdf with these lines:
DynamicExtensions {
example = /path/to/example.so
}
Nothing happened. And then I saw this: From: http:// hhvm.com/blog/4349/hhvm-3-0-0
We are moving from .hdf config files to .ini. The default one lives in /etc/hhvm/php.ini. We don’t support all the old options yet, so you can still use config.hdf for now, but be ready for it to die in the next release. All of your favorite options will go from Foo { BarBaz = True } to hhvm.foo.bar_baz = true.
OK, then I tried to put lines in /etc/hhvm/php.ini or /etc/hhvm/server.ini instead of .hdf
hhvm.dynamic_extensions.example = /path/to/example.so
But with no luck, nothing worked. I need more info/docs.
So, is there anyone know what happen? or if the HHVM team from Facebook see this post, could you please help me?
hphpize
and the necessary header and cmake files. – Rorahhvm-dev
if you dont want to compile it, it'll allow you to run hphpize – Balkan