can't load HHVM extension (dynamic)
c++, facebook, hhvm, php
Solution
I see that you've managed to get it to load, so I'll just focus on not being able to find the function.
Shortly after the release of HHVM 3.0, the way that PHP files are loaded from extensions changed. Basically, the first four characters of the name of the file are stripped when embedding it, since it's expected to be `ext_name.php`. The example extension hadn't been updated for this change until last night.
The change is rather simple. Just rename `example.php` to `ext_example.php` and, in `config.cmake` change `HHVM_SYSTEMLIB(example example.php)` to `HHVM_SYSTEMLIB(example ext_example.php)` then re-run `cmake . && make`.
You can see the committed change (which does exactly this) here
Problem
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?