Report this

What is the reason for this report?

Make nginx use PHP-FPM instead of HHVM for specific script

Posted on August 2, 2015

I am loving HHVM but there is issue with one WP plugin(justified image grid) which uses TIMTHUMB to resize images and this one doesn’t seem to play with HHVM.

I am using fallback like this:

http://i.imgur.com/wn3UklV.png

But it doesn’t work.

Is it possible to make an exception and make timthumb.php file use only PHP-FPM?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

It works but I think that now it’s using PHP for everything. Before it looked like this

upstream hhvm {
        server unix:/var/run/hhvm/hhvm.sock;
}

upstream php {
        server unix:/var/run/php5-fpm.sock;
}

Edit the upstream directive of hhvm and set PHP FPM as a backup server:

upstream hhvm {
    server 127.0.0.1:8000;
    server unix:/run/php5-fpm.sock backup;
}

i think u can get necessary help by following this: https://bjornjohansen.no/hhvm-with-fallback-to-php

[and it might be best way to use fallback]

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.