HHVM loves relative paths, but Repo.Authoritative don't
I noticed something interesting when trying to get Repo.Authoritative running.
Using a fairly normal nginx / hhvm setup with the stock Ubuntu packages for HHVM, I got this error from hhvm when trying to request a WordPress site in authoritative mode:
\nNotice: File could not be loaded: ../srv/web/domain.com/root/index.php
I compiled all files in hhvm.hhbc with absolute paths, so that it would give an error when trying to retrieve a file with a relative path didn't come as a huge surprise; It was more that it tried to retrieve the file with a relative path in the first place that puzzled me.
I use absolute paths everywhere, so this isn't coming from something I explicitly configured. Interestingly, setting Server.SourceRoot to some arbitrary directory, let's say /srv causes hhvm to try to retrieve the file relative to this directory, making the error message:
\nNotice: File could not be loaded: web/domain.com/root/index.php
It seems HHVM really, really wants to try to make relative paths for all files, and of course, repo.authoritative really, really hastes that.
So, I tried the obvious, I generated the file list with only relative file paths.
cd /tmp && find ../srv -name \*.php
It worked fine. Only not really. HHVM proudly retrieved the index.php, but index.php wants to include tons of files by their absolute path. And since all paths in hhvm.hhbc now were relative, the outcome of that brave attempt was an obvious failure. There's however an equally obvious way to work around this:
cd /tmp && find ../srv /srv -name \*.php
Now everything works perfectly, but this really can't be the intended solution? What am I doing wrong?
you can try this way to configure your file:
Eval{
CheckSymLink = true
}
you can use relative path,if have problem we keep communication
Being unable to reproduce this anymore with the latest release, I'm closing this.