Skip to content

Instantly share code, notes, and snippets.

@hcooper
Last active April 12, 2016 06:05
Show Gist options
  • Save hcooper/d683a90d2695ecf6752f to your computer and use it in GitHub Desktop.
Save hcooper/d683a90d2695ecf6752f to your computer and use it in GitHub Desktop.

Running Koken on HHVM

There's only three steps required to make Koken 0.15.0 work on HHVM:

  1. Koken's plugin support depends on the output of get_declared_classes() matching the order the that classes were defined - which can't be guaranteed. The best solution for this would be to ensure plugins were named the same as their classes, but until they do, this patch parses the plugin for the class name: https://gist.github.com/hcooper/a978a1328da787deb390

  2. In i.php Koken hard-codes a Content-Length header, which causes requests to hang when responses are gzip'ed, (as declared length != actual length). In this diff we just removed the header and let the webserver decided what to do instead (i.e. in most cases return chunked-content rather than set length): https://gist.github.com/hcooper/a1c7a882914679a0ccc9

  3. BONUS - switch Koken from using ImageMagick to GD instead (GD support is built into HHVM): https://gist.github.com/hcooper/081bc779d374eefa7293

@meulie
Copy link

meulie commented Apr 12, 2016

Have these patches made it into Koken yet, or should I apply this myself if I want to migrate to HHVM?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment