Question

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

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?

Subscribe
Share

Submit an 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.

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]

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;
}