How to configure PHP handlers

Created:

2016-11-16 12:57:00 UTC

Modified:

2017-04-04 02:21:21 UTC

2

Was this article helpful?


Have more questions?

Submit a request

How to configure PHP handlers

Symptoms

How can I configure what php will be used for processing php scripts? Does Plesk support mod_php?

Resolution

By the default Plesk uses Apache module for processing php scenarios (known as mod_php).

The following of PHP handlers can be configurred to use:

  • ISAPI (Windows)
  • Apache module (Linux)
  • FastCGI
  • CGI
  • PHP-FPM (Linux)

Handler choosing depends on security considerations, script execution speed, and memory consumption. An additional information about PHP handler features can be found in Plesk Administrator Guide

You can select a PHP handler for a service plan or a website correspondingly in:

  • service plan settings ( Hosting Parameters tab > Scripting > Run PHP as )

  • website settings ( Control Panel > Websites & Domains > select a domain > Hosting Settings > Run PHP as )

Note: According to Plesk Administrator's Guide PHP-FPM cannot be selected for all websites at once in service plan settings; you can use this handler only for individual websites.

Note: Switching PHP from Apache module to FastCGI application may impair the functionality of existing PHP scripts. Switching to PHP-FPM by selecting Process PHP by nginx in the website’s web server settings may do the same.

Plesk supports different versions of PHP. For each available handler, and one or more PHP versions can be selected. For details, see Multiple PHP Versions .

The list of PHP handlers available in the Plesk UI depends on the operating system and the web server that is processing PHP files. One of the handlers, PHP-FPM, additionally needs to be installed with the Parallels Installer.

Additionally, uou can switch off the Apache web server modules that are not critical to hosting services in Tools & Settings > Apache Web Server . This will allow you to reduce server resources consumption (for example, get the smaller RAM footprint that is critical to VPS) and, as a result, provide for more hosting customers on a server.

Note: that some modules are interdependent and can be switched off (on) only when the modules they depend on are off (on). For example, the cache module depends on disk_cache , file_cache , and mem_cache modules. This means that you cannot switch off the cache until its three dependent modules are off.

Have more questions? Submit a request
Please sign in to leave a comment.