We use HHVM rather than PHP-FPM on Nginx because it is way faster and creates far less load per visitor. HHVM is incompatible with certain PHP that PHP-FPM (PHP 5.x) doesn't have a problem with, so apps sometimes need edits to make them work.

In our case, we use Civi inside WordPress. WordPress seems to work fine in HHVM, as does our testing with Drupal so far.

I can't find any references to CiviCRM's compatibility with HHVM.

Has anyone tried it? Gotten it working? Should we give up?

  • Hi Jeremy, Great to hear you are using CiviCRM. I did do a test with CiviCRM and WP-Engine and was able to get it to work. While it has not been tested (to my knowledge) and I use PHP-FPM on almost all my CiviCRM installs, I know of no reason it should not work. Kevin – Kevin Cristiano May 25 '16 at 21:38
  • Hi Kevin, this seems like an answer, not sure why you made it a comment instead :) – jerclarke May 26 '16 at 17:37
  • That said, in our testing Civi was giving consistent WSOD while we had HHVM running, but worked normally once we switch to PHP-FPM only. Could be it affects some setups/mixes of plugins differently from others. Certainly a Drupal+Civi setup would be likely to behave differently from a WordPress+Civi setup. – jerclarke May 26 '16 at 17:38
  • It was a comment as I had not tested it. I'll see if I can get a HHVM test going - I would like to see this configuration tested and working. – Kevin Cristiano May 26 '16 at 18:13

I have tested this and have duplicated the WSOD error. The error I get in the hhvm log is Fatal error: Cannot access private property Civi\\Core\\Transaction\\Frame::$state As I am not that familar with HHVM I cannot take it much further.

Jeremy, do you get the same issue with Drupal and CiviCRM?

I have been satisfied with PHP-FPM performance, so while I hate to give things up, that may be the quickest path to getting this to work.

  • Yeah I was using WP also and that's the error I got. Don't know Civi or HHVM well enough to want to solve it either. Thanks. – jerclarke May 26 '16 at 20:50

I was able to fix this by editing the file at wp-content/plugins/civicrm/civicrm/Civi/Core/Transaction/Frame.php and commenting out the assert calls that reference $this->state.

  • Dave - can you create an issue at issues.civicrm.org and create a PR? Thanks for working on this – Kevin Cristiano Jun 6 '16 at 16:34
  • @KevinCristiano - I made the issue at issues.civicrm.org/jira/browse/CRM-18766 - I didn't make a PR because I didn't think just blindly deleting code was ideal ;) – Dave Rolsky Jun 6 '16 at 21:08
  • Understood, I'll take a look there when I can. Would like to see if we can get HHVM working. – Kevin Cristiano Jun 6 '16 at 21:10
  • IMHO, this is an HHVM bug. However, at this point, the assertion is not strongly needed, so I would not be -1 on removing the assertion. – Tim Otten Jun 7 '16 at 6:57
  • @TimOtten: does Civi handle assertions? (i.e. throw an Exception, log?) Any reason we can't replace with: if ($this->state === self::F_NEW) { throw new Exception() ... } ? – bgm Jun 7 '16 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.