1

I'm having trouble running a php file against the hip hop virtual machine. I setup a new Ubuntu 12.04 server, installed according to this guideline, however when trying to following examples from the Running HipHop page, it goes south.

Namely:

ubuntu:~$ $HPHP_HOME/src/hhvm/hhvm --hphp sample.php 
-bash: /src/hhvm/hhvm: No such file or directory

I'm kind of at a loss as I haven't found many examples of how to run it exactly.

onassar
  • 3,313
  • 7
  • 36
  • 58
  • 1
    `/src/hhvm/hhvm: No such file or directory` sounds like `$HPHP_HOME` is not defined. What does `echo $HPHP_HOME` return? – Anew Feb 12 '13 at 16:37
  • It gives me an empty string. Which is strange since I spun up a brand new instance and installed their package directly. `which hhvm` gives me `/usr/bin/hhvm` – onassar Feb 12 '13 at 16:53

2 Answers2

0

If you installed the package, check for /usr/bin/hhvm and use that to run your scripts. I added some more examples to https://github.com/facebook/hiphop-php/wiki/Running-HipHop-VM

Paul Tarjan
  • 48,968
  • 59
  • 172
  • 213
0

Not sure if it is reasonable to follow up a one-year old question.

The Hello world example at

 https://github.com/facebook/hiphop-php/wiki/Running-HipHop-VM

likely assumes some configuration, like PHP home, is already set before doing that. W/o config, curl cannot work and get hello.php.

To config, come up with config.hdf, following

 https://github.com/facebook/hiphop-php/wiki/Runtime-options

then do

hphp/hhvm/hhvm -m server -c config.hdf
Joe C
  • 2,757
  • 2
  • 26
  • 46