Skip to content

Running multiple versions of php


The most stable way to run PHP on Apache, based on our experience, is the PHP module. However, you can only run one PHP module at a time. So, you need to run other versions as FastCGI/PHP-FPM, which as not as stable.


Nginx does not have its own PHP module. Therefore, the only option is to run PHP-FPM. The configuration differences in servers with one PHP version and multiple ones are minimal.

PHP-FPM vs PHP module

There some differences, when running PHP-FPM as module, that you need to be aware of. First of all, it is not possible to adjust its behavior using .htaccess (using php_value, php_flag etc.). Moreover, you need to fine-tune timeouts for communication between the webserver and PHP-FPM (especially in the case of long-running scripts, e.g. cron jobs).