I've been hearing about HHVM for a while now, and when I knew Openshift was offering it as a free option, I decided to check it out.
However, it doesn't seem like my virtual machine is properly recognizing or serving either .hh files or files containing the hh start tag (hack files). I'm assuming this is a configuration problem, but I don't have much system set-up expertise and I'm not sure how to fix it.
If I try to run phpinfo()
I just get back the one-word HipHop
which I assume is for security. That suggests that the HHVM is actually serving the PHP file, but in that case, I don't know why the hh tag is not working (the code I tried to serve was ultra simple: < ? hh echo "hello"; ?>
).
Openshift's VM runs nginx and HHVM, but the configuration seems to be a little different than that suggested for those installing their own.
I discovered the problem --it's very simple, but I'm posting the answer in case it might help others with the same problem.
In php, you typically open each file with < ? php and close it with ?>
In hack, the file opens with < ? hh, but you CANNOT use a close tag at the end.