Skip to content

Instantly share code, notes, and snippets.

@gondo
Forked from SchumacherFM/Magento-HHVM.md
Created August 17, 2013 03:15
Show Gist options
  • Select an option

  • Save gondo/6255074 to your computer and use it in GitHub Desktop.

Select an option

Save gondo/6255074 to your computer and use it in GitHub Desktop.

Running Magento Enterprise Edition with Facebook HipHop HHVM

Prerequisites

I ran a big customized Magento EE store from a big Swiss scout store.

URL schema is different that from the official demo store: www.customer.ch/[de|fr]/index.php to map automatically different languages.

Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-23-generic x86_64) in a virtualbox via vagrant.

Magento Cache activated. MySQL database slightly optimized via mysqltuner.pl

  • 5000 SKUs
  • 237 categories
  • 48.000 url rewrites
  • 4 store views

Magento EE sources has been imported into the VM. Not via shared folders or NFS.

Compile and Download HipHop

Use can use that install script install-hhvm.sh for compiling and installing hiphop https://github.com/jakoch/php-hhvm.

But change the hiphop source in function get_hiphop_source() to the special Magento hiphop https://github.com/danslo/hiphop-php source.

Optionally: You can remove all the last lines after ## Success in the script install-hhvm.sh.

Official FB "How to" compile: https://github.com/facebook/hiphop-php/wiki

Prebuild packages will not work with Magento.

HHVM config.hdf

Options for the config.hdf file: https://github.com/facebook/hiphop-php/blob/master/hphp/doc/options.compiled

Please see the to this gist attached file hhvm.hdf.

Magento Errors

I'm not quite sure if that is still a problem with SimpleXML or with buggy Magento code.

Fixes:

  • File site/app/code/core/Mage/Core/Block/Template/Facade.php every: $key = (string)$key;

Unfixable:

  • There are also some errors in the site/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php on line 441 but that results from strange code in phtml files ...

Therefore I could test all except displaying product list.

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