{"id":51877,"date":"2019-02-26T12:00:52","date_gmt":"2019-02-26T18:00:52","guid":{"rendered":"https:\/\/blog.cpanel.com\/?p=51877"},"modified":"2019-02-26T12:00:52","modified_gmt":"2019-02-26T18:00:52","slug":"lets-talk-multiphp","status":"publish","type":"post","link":"https:\/\/devel.www.cpanel.net\/blog\/products\/lets-talk-multiphp\/","title":{"rendered":"Let’s Talk MultiPHP"},"content":{"rendered":"\n
Many hosting providers have a large customer base with varying needs for their online projects. The\u00a0MultiPHP Manager<\/a>\u00a0interface allows you to easily manage the PHP and PHP-FPM configurations of your cPanel accounts and domains and is available for systems running EasyApache 4. There are quite a few different features that the\u00a0MultiPHP Manager<\/a>\u00a0interface provides, including:<\/p>\n\n\n\n Let’s get a little more in-depth into these features!<\/p>\n\n\n\n System PHP Version<\/a> is the version of PHP that is the global default version for all accounts on a server. This setting can only be changed by a root-level user. When any new account is created on a server, that account will use the System PHP version by default, and any primary domain set to Inherit<\/a>. <\/em>For cPanel & WHM versions older than the upcoming version 80, the default System PHP version will become the latest version of PHP installed on the server. In versions beyond 80, the default System PHP version will be PHP 7.2.<\/p>\n\n\n\n To change the system default PHP, perform the following steps:<\/p>\n\n\n\n Changing the system’s default PHP version will also change any primary domain set to Inherit<\/em>. <\/p>\n\n\n\n In EasyApache 4, each PHP version can use a\u00a0PHP handler<\/a>\u00a0(a type of Apache module that contains libraries that the Apache webserver can use to interpret and run PHP code). The\u00a0PHP Handlers<\/em>\u00a0tab allows you to select the\u00a0PHP handler that each version\u00a0of PHP uses. So if there was a scenario where a user wanted a certain Apache module on one version of PHP, but not another, the MultiPHP Manager feature makes this possible. With the flexibility of PHP Handlers, you can allow users to run whichever versions of PHP that you make available to them.<\/p>\n\n\n\n In EasyApache 4, each domain or virtual host can use any currently-installed PHP version or currently-installed PHP-FPM setting. <\/p>\n\n\n\n The domains table<\/a> displays the following information:<\/p>\n\n\n\n Parked domains (aliases) are not listed in the domains table. These domains will just use the same settings as the domain they’re aliased to.<\/p>\n\n\n\n PHP FastCGI Process Manager (PHP-FPM<\/a>) is a very speedy alternative FastCGI daemon for PHP that grants your websites the ability to set specific amounts of resources to process a domain\u2019s requests.\u00a0 PHP-FPM maintains\u00a0pools<\/a>, which are workers available to respond to PHP requests. These pools of workers are what allow the website to process a higher load of requests than other handlers might allow. PHP-FPM differs from SUPHP in that\u00a0PHP-FPM does not overload a system\u2019s memory with PHP from Apache processes, unlike\u00a0 For instance, your site may receive a large boost of traffic after being featured in an ad campaign or mentioned on a television show. This new method will allow you to process extra traffic that requires additional resources without lifting a finger.\u00a0<\/p>\n\n\n\n PHP-FPM uses a service to serve PHP requests that Apache routes traffic to and will only execute PHP requests, enabling PHP-FPM to service content quicker than other customary methods. For users who are serving content that\u2019s not explicitly PHP-based, i.e., Ruby applications, and are switched to PHP-FPM, fear not. Sites that are not written in PHP will continue to work and serve properly using PHP-FPM, as only PHP sites would be affected. With that being said, non-PHP sites might not see the same performance boosts with PHP-FPM. In version 78, we’ve added the ability to automatically configure some PHP INI settings directly from WHM’s MultiPHP Manager Interface (WHM >> Home >> Software >> MultiPHP Manager<\/em>). The new System PHP-FPM Configuration<\/em> tab allows WHM users to set the system’s PHP INI directives (if you’re a systems administrator, these can still be updated manually through the command line). CloudLinux has a similar tool in their offering that allows a user to swap between different versions of PHP. The difference between what they have available and what cPanel has is thus: the CloudLinux PHP selector <\/a>is a component that sits on top of CageFS<\/a> allowing each user to select their desired PHP version and modules. cPanel’s MultiPHP selector does not require having CloudLinux as their OS of choice and does not require CageFS, as the CloudLinux selector does (we do highly recommend using cagefs, however<\/a>). CloudLinux also patches and ships End of Life PHP versions going back as early as 4.4, whereas cPanel only offers those PHP versions that are still currently supported. Giving customers the ability to choose their desired version of PHP allows them to be flexible in their maintenance and design of their sites. For those end-users who are slower to adapt to the newest and most secure versions of PHP, MultiPHP selector offers a sliding scale of versions that allow those slower to adapt users a chance to upgrade their PHP versions at a moderate pace. They’re also given a chance\u00a0to switch the PHP handler and test their site to see what issues they may run into once the PHP version is changed\u00a0while being able to swap back and correct any issues before the server’s PHP version is changed.<\/p>\n\n\n\n Would you like to discuss the MultiPHP Manager more, or have questions? Please reach out to us on our Official cPanel Slack<\/a> and Discord<\/a> channels, or our official cPanel Subreddit!<\/a><\/p>\n","protected":false},"excerpt":{"rendered":" Many hosting providers have a large customer base with varying needs for their online projects. The\u00a0MultiPHP Manager\u00a0interface allows you to easily manage the PHP and PHP-FPM configurations of your cPanel accounts and domains and is available for systems running EasyApache 4. There are quite a few different features that the\u00a0MultiPHP Manager\u00a0interface provides, including: Hosting providers […]<\/p>\n","protected":false},"author":77,"featured_media":65109,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[49],"tags":[497,325],"class_list":["post-51877","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-products","tag-feature","tag-product-development"],"acf":[],"yoast_head":"\nSystem PHP Version
<\/h2>\n\n\n\n<\/figure>\n\n\n\n
PHP Handlers<\/h2>\n\n\n\n
<\/figure>\n\n\n\n
Using the Domains Table<\/h2>\n\n\n\n
PHP-FPM and System Pools<\/h2>\n\n\n\n
ruid2+php-dso\u00a0<\/code>. <\/p>\n\n\n\n
You\u2019re able to designate which domains utilize PHP-FPM by enabling or disabling it within the MultiPHP Manager interface. Also, you can customize the Pool Options to fit your needs. Need one domain to process 1000 child processes at once but another on 5? Just adjust the pool options for each, and you\u2019re all set.<\/p>\n\n\n\nWhat’s New with MultiPHP in Version 78?<\/h2>\n\n\n\n
<\/figure>\n\n\n\n
Additionally, PHP-FPM Pool Options have been moved to a new tab in the MultiPHP Manager Interface, where systems administrators can access the system PHP-FPM Pool Options through the new System PHP-FPM Configuration <\/em>tab. Clicking Edit PHP-FPM <\/em> from the domain’s row in the domain table will give you access to domain-specific pool options and the ability to edit Pool Options for that domain, as well as the domain’s PHP INI directives.<\/p>\n\n\n\nCloudLinux PHP Selector and Why Choosing Your PHP Version is Important<\/h2>\n\n\n\n
<\/p>\n\n\n\n