How to change a PHP mode

Introduction

 

Site settings allow to select between different PHP modes:

  • PHP as an Apache module
  • PHP-FPM
  • FCGI
  • CGI

 

Using any module different form “Apahe module” allow you to change a PHP version if it is installed.

Let's take a closer look at each mode.

 

PHP as Apache module

This mode uses a system-default PHP version. In this case Nginx becomes a Frontend server and Apache as a Backend. Apache operates in MPM ITK mode which allows sites to operate under a separate user.

CGI

This mode allows switching between PHP versions. Apache operates as a Backend server and creates a separate PHP processing process for each request.

FCGI

This mode allows switching between PHP versions. Apache operates as a Backend server but in FCGI case processes are being kept in the server memory and process several requests which speeds up PHP scripts processing which, in turn, affects a site working speed. It is recommended to use this mode when an alternative PHP version is used.

PHP-FPM

This mode allows switching between PHP versions. In this case PHP-FPM is used as a Backend server and Nginx stays as a Frontend server. It is required to keep in mind that in this mode .htaccess files can not be processed and all .htaccess settings has to be converted into Nginx configuration.

This site uses cookie to collect data about IP-address and geolocation in order to provide the most accurate data regarding your request. By continuing to use this web-site you automatically agree with using these technologies.