Use HHVM on Heroku
Shell
Latest commit f216335 May 5, 2014 @ptarjan ptarjan Merge pull request #18 from CenturyLinkLabs/detect-hacklang
Adding index.hh detection
Permalink
Failed to load latest commit information.
bin Fixing config file distribution Apr 8, 2014
conf Adding index.hh support Apr 8, 2014
.gitignore I hate .DS_Store Aug 29, 2013
.travis.yml And empty commit to make travis run Dec 21, 2013
README.md Update README.md Apr 3, 2014

README.md

Heroku Buildpack for HHVM

Build Status

This is a Heroku buildpack (and Cloud Foundry Buildpack) for PHP apps to run on HHVM.

The buildpack will detect your app as PHP if it has a index.php or composer.json file in the root.

Usage

To use it with a new app:

heroku create --buildpack https://github.com/hhvm/heroku-buildpack-hhvm

Or to convert your existing PHP app:

heroku config:set BUILDPACK_URL=https://github.com/hhvm/heroku-buildpack-hhvm
<make some git change and commit it>
git push

If your app needs a custom config.hdf just save it in the root of your project. Otherwise, a default one will be applied with the following settings:

Server {
  DefaultDocument = index.php
}

CLI

The buildpack can't set environment variables (slug compilation takes place on different dynos). If you plan to run HHVM from CLI, you can define LD_LIBRARY_PATH by running:

heroku config:add LD_LIBRARY_PATH=vendor/hhvm/

Performance

You should see anywhere between 2x and 10x performance gains on your app. This means you will need fewer dynos to serve the same amount of traffic.

Problems

If you have some PHP code that won't run with HHVM, we would love you to send us example code and open an issue. HHVM's goal is to support all open source projects, so please report any and all issues.