These instructions are only known to work on 64-bit systems.
Physicians Billing Services Medical Billing Services Medical Billing Specialists
Setting up HipHop PHP
- Install git and build dependencies:
sudo apt-get install cmake g++ libboost-dev flex bison re2c libmysqlclient-dev libxml2-dev \ libmcrypt-dev libicu-dev openssl binutils-dev libcap-dev libgd2-xpm-dev zlib1g-dev libtbb-dev \ libonig-dev libpcre3-dev distcc git-core dpkg-dev debhelper autotools-dev autoconf libtool \ libcurl4-openssl-dev
- Create a working directory:
mkdir hiphop cd hiphop export HIPHOP=`pwd`
- Get the source:
git clone git://github.com/facebook/hiphop-php cd hiphop-php git submodule init git submodule update cd ..
- Get and build the patched
libevent
:wget http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz tar xzf libevent-*-stable.tar.gz cd libevent-1.4.13-stable cp ../hiphop-php/src/third_party/libevent.fb-changes.diff . patch < libevent.fb-changes.diff ./configure make make install prefix=$HIPHOP cd ..
- Get and build
libicu
4.2:wget http://download.icu-project.org/files/icu4c/4.2.1/icu4c-4_2_1-src.tgz tar xzf icu4c-*-src.tgz cd icu/source ./configure make make install prefix=$HIPHOP cd ../../
- Get and build the patched
curl
:wget http://curl.haxx.se/download/curl-7.20.0.tar.gz tar xzf curl-*.tar.gz cd curl-7.20.0 cp ../hiphop-php/src/third_party/libcurl.fb-changes.diff . patch -p1 < libcurl.fb-changes.diff ./configure make make install prefix=$HIPHOP cd ..
- Build HipHop:
cd hiphop-php export CMAKE_PREFIX_PATH=$HIPHOP export HPHP_HOME=`pwd` export HPHP_LIB=`pwd`/lib
- * If
cmake . make
cmake
fails, run the following to empty the cache before trying again:rm CMakeCache.txt
- Test HipHop.
- From the shell:
cd .. echo "Hello, world." > test.php hiphop-php/src/hphp/hphp test.php --keep-tempdir=1 --log=3 --output-dir=$HIPHOP/test-build test-build/program -m server -p 8080
- From a browser or other HTTP client, visit
http://localhost:8080/test.php
- Output should consist of "Hello, world."
- From the shell, press
Ctrl-C
.
- From the shell:
Building Pressflow
These directions are a work in progress.
- Install Bazaar:
sudo apt-get install bzr
- Go into the HipHop directory:
cd $HIPHOP mkdir pressflow-build
- Check out Pressflow from the Hip Hop compatibility branch and make it the working link building directory:
bzr checkout lp:pressflow/6.x-hiphop cd 6.x-hiphop
- Generate includes:
find . -name "*.php" > ../pressflow-build/files.list find . -name "*.inc" | grep -v "\.pgsql\.inc" | grep -v "\.mysql\.inc" >> ../pressflow-build/files.list find . -name "*.module" >> ../pressflow-build/files.list find . -name "*.install" >> ../pressflow-build/files.list find . -name "*.profile" >> ../pressflow-build/files.list
- Build the system:
$HIPHOP/hiphop-php/src/hphp/hphp --input-list=$HIPHOP/pressflow-build/files.list --keep-tempdir=1 \ --log=3 --include-path="." --force=1 -v "AllDynamic=true" --output-dir=$HIPHOP/pressflow-build
- Fix everything, rebuild.
- Launch the server:
../pressflow-build/program -m server -p 8080 -v "Server.SourceRoot=`pwd`" -v "Server.DefaultDocument=index.php" -c $HIPHOP/hiphop-php/bin/mime.hdf
Credits
The basis for dependencies and the build above is the "Building and installing" page posted to the GitHub wiki for Hip Hop PHP.