Translate: 
EnglishFrenchGermanItalianPolishPortugueseRussianSpanish

Download VMware image of Fedora 14 Linux with HipHop for PHP installed

Many articles on this blog describes the performance and functionality of HipHop. Since many readers like the dry facts, I decided that I prepare an image of Linux distribution, which will have a built-in support to PHP code translator.

Where to download?

Ready VMware image can be downloaded from this link. The image has been compressed using 7zip, thereby to open the archive you need to use this program.

What should you remember before you start the system?

This system is configured only for the development environment, so I opened the following ports in the firewall: 21 (FTP), 22 (SSH), 80 (HTTP) and 3306 (MySQL). Because of security reasons it is best to run this server with a private IP set.

I installed following system services: Apache (does not start automatically), MySQL, SSH and developement tools: ccache, distcc (faster compilation), SVN, CSV, git (clients).

Please remember to fine tune your VMware configuration according to the host system you are using (ie. change the number of CPU’s and available RAM for this image).

Warning! System and MySQL password for root is “root”, so you need to change it to something less obvious and more secure.

Where is the HipHop for PHP translator?

The application is located in the /root/hiphop/ directory.

To compile a sample PHP file you should use the following command:

/root/hiphop/hiphop-php/src/hphp/hphp --log=3 index.php

Please report image problems in comments below.

Tags: , ,

14 Responses to “Download VMware image of Fedora 14 Linux with HipHop for PHP installed”

  1. sudono says:

    hi, thank you. I’ve downloaded your VM image, but it gives me error like below when I run hphp command, can you help me whats wrong with that??
    Thanks.

    CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):\n The C compiler “/usr/bin/cmake” is not able to compile a simple test\n program.\n\n It fails with the following output:\n\n Change Dir: /tmp/hphp_zBqD2B/CMakeFiles/CMakeTmp\n\n \n\n Run Build Command:/usr/bin/gmake “cmTryCompileExec/fast”\n\n /usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make\n CMakeFiles/cmTryCompileExec.dir/build\n\n gmake[1]: Entering directory `/tmp/hphp_zBqD2B/CMakeFiles/CMakeTmp’\n\n /usr/bin/cmake -E cmake_progress_report\n /tmp/hphp_zBqD2B/CMakeFiles/CMakeTmp/CMakeFiles 1\n\n Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o\n\n /usr/bin/cmake gcc -o CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -c\n /tmp/hphp_zBqD2B/CMakeFiles/CMakeTmp/testCCompiler.c\n\n CMake Error: The source directory\n “/tmp/hphp_zBqD2B/CMakeFiles/CMakeTmp/testCCompiler.c” is a file, not a\n directory.\n\n Specify –help for usage, or press the help button on the CMake GUI.\n\n gmake[1]: *** [CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o] Error 1\n\n gmake[1]: Leaving directory `/tmp/hphp_zBqD2B/CMakeFiles/CMakeTmp’\n\n gmake: *** [cmTryCompileExec/fast] Error 2\n\n \n\n \n\n CMake will not be able to correctly generate this project.\nCall Stack (most recent call first):\n CMakeLists.txt:19 (PROJECT)\n\n\n
    hphp failed

  2. Artur Graniszewski says:

    hi. can you paste the command you used to. compile the php program?

  3. sudono says:

    This is my command to compile the php script:
    /root/hiphop/hiphop-php/src/hphp/hphp –log=2 bench_1.php

    My current directory is: /root/bench
    I try to compile php benchmark script from http://www.php-benchmark-script.com

  4. Artur Graniszewski says:

    Ok, I know what is wrong.

    I made a silly mistake when adding exports to the .bashrc file. I’m uploading new vmware image right now, but till then you can fix it in your image by yourself.

    In order to do so, you have to change the .bashrc file and change following lines :

    export CC=”cmake gcc”
    export CXX=”cmake g++”

    to

    export CC=”ccache gcc”
    export CXX=”ccache g++”

    Please, let me know if it works for you

  5. Artur Graniszewski says:

    Ok, I uploaded new version of vmware image, you can download it from the link above if you haven’t fixed it by yourself.

  6. sudono says:

    I changed CC and CXX on .bachrc, and after compilation time is about 1 minute on my VM (1gb memory dual core processor),
    now it works !! :) but I have to strip out pi() function on that benchmark script.
    Thank you for your help Artur.

  7. emiraga says:

    Thank you so much for providing this. Awesome!

    There is still a small typo in .bashrc,
    export CXX=”ccahe g++”
    correct version has been posted above.

  8. Artur Graniszewski says:

    Thanks for reporting this issue, I’ve just uploaded new VMware image which fixes this typo.

  9. Scott says:

    hphp wont run it give me the error
    -bash: hphp: command not found

    Command Using:
    /hiphop/hiphop-php/src/hphp/hphp

  10. Artur Graniszewski says:

    Scott, can you paste me the output of this command?

    ls -al /hiphop/hiphop-php/src/hphp

  11. Thomas Shores says:

    Artur, thanks again for providing this. I wasn’t able to get hiphop to run on my linux box, so this is really helpful. I’ve run into one problem though: When I compile the sample file as you suggest, I get the error message

    /tmp/hphp_fed005/sys/scalar_arrays.no.cpp:4:34: fatal error: sys/global_variables.h: No such file or directory\ncompilation terminated.\nmake[2]: *** [CMakeFiles/program.dir/sys/scalar_arrays.no.cpp.o] Error1\nmake[1]: ** [CMakeFiles/program.dir/all] Error 2\nmake: *** [all] Error 2\n

    How can I fix this?

  12. Artur Graniszewski says:

    Unfortunately HipHop for PHP is not a bugfree software, in order to help you, I need to know, what PHP script you want to compile. For example, as far as I know, compilation fails ultimately in case of Cake PHP framework, etc.

    If your script is simple, then paste it somewhere and give me a link.

  13. Thomas Shores says:

    Thanks, Artur, for your offer to help. I figured out my problem and it was such a stupid error that I won’t even tell you what it was. Anyway, everything appears to be working beautifully.

    I was incredibly frustrated trying to build hiphop on my own Fedora 14 installation. The facebook website instructions (such as they were) didn’t work for me and I tried to follow several other websites that gave what instructions worked for them (though there were errors here and there, like a forgotten configure command), but in every case I got hung up with failure for the patched curl or libevent files to be built, or even when I got to hiphop itself, failure with various cryptic messages about missing headers, etc, etc. It seems that for these instructions to work you must have *exactly* the same configuration as the author at the time they issued them. Anyway, I’m a happy camper now, thanks to you. I’m sure I’m not alone in appreciating the favor you’ve done part-time coders such as myself. Thanks again!!

  14. Banners Broker says:

    Hey there! I’ve been reading your blog for a while now and finally got the courage to go ahead and give you a shout out from Austin Texas! Just wanted to say keep up the excellent work!

Leave a Reply