Using Extension API
I am trying to add extension to hhvm via using extension api. But I could not success. I have followed these steps;
- new file under system/php (system/php/ahmet/Ahmet.php)
- I put this path to "hphp/system/php.txt"
- I rerun (sudo cmake .) on main directory of hhvm source code.
- I recomplied hhvm(sudo make -j)
Result of compiling was succesfull.
{ Embedding php in hhvm Creating symlinks for hhvm [100%] Built target hhvm }
But I can not access my class or functions. what is the problem?
Are you using the IDL or the HNI API?
cc @sgolemon @JoelMarcey
I am using pure PHP code. Because hhvm support making extension via pure php code.
https://github.com/facebook/hhvm/wiki/Extension-API
Could you clear your CMake cache and try it again?
rm CMakeCache.txt && cmake . && make -j
I run command. but there is no change.



You won't get an entry in the extensions list. If you want that entry you need to use HNI (where it could also be a pure php implementation).
So are you sure you haven't access to your classes/functions defined in Ahmet.php?
Make sure your path in php.txt is correct! Notice that paths on linux are case sensitive.
- Are you planning on releasing this extension publically and contributing it to HHVM? If so, could you share a link to your code, then it would be much easier to help you
- Otherwise, you should look at building an out-of-tree extension (eg https://github.com/mongofill/mongofill-hhvm), or as it's pure PHP, just building a composer package
Closing due to inactivity.
https://github.com/facebook/hhvm/wiki/Human-Timeouts