Let’s Talk MultiPHP

MultiPHP Multiple Versions  of PHP

The MultiPHP Manager interface 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 MultiPHP Manager interface provides, including:

  • Hosting providers can switch between a number of different PHP versions with the click of a button, or allow more advanced users to upgrade to a newer version of PHP more quickly than others.
  • System Administrators can select the system’s PHP version (the global default PHP version for all accounts) and manage PHP-FPM configuration on each domain.
  • In EasyApache 4, each PHP version can be set to use a different PHP handler.
  • A systems administrator can manage the pool option of any virtual host they own.

Let’s get a little more in-depth into these features!

System PHP Version

System PHP Version 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. 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.

To change the system default PHP, perform the following steps:

  1. Click  Edit  in the  System PHP Version  section.
  2. Select your desired PHP version from the menu.
  3. Click  Apply .

Changing the system’s default PHP version will also change any primary domain set to Inherit.

PHP Handlers

In EasyApache 4, each PHP version can use a PHP handler (a type of Apache module that contains libraries that the Apache webserver can use to interpret and run PHP code). The PHP Handlers tab allows you to select the PHP handler that each version of 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.

Using the Domains Table

In EasyApache 4, each domain or virtual host can use any currently-installed PHP version or currently-installed PHP-FPM setting.

The domains table displays the following information:

  • Domain — The domain’s name.
  • Account — The domain’s account name.
  • Account Owner — The account owner’s name.
  • PHP Version — The PHP version that the domain currently uses, and whether the account inherited that setting.
  • PHP-FPM — The domain’s PHP-FPM status.

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.

PHP-FPM and System Pools

PHP FastCGI Process Manager (PHP-FPM) 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’s requests.  PHP-FPM maintains pools, 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 PHP-FPM does not overload a system’s memory with PHP from Apache processes, unlike ruid2+php-dso .

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.

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’s 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.

You’re 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’re all set.

What’s New with MultiPHP in Version 78?

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). The new System PHP-FPM Configuration 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).

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 tab. Clicking Edit PHP-FPM  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.

CloudLinux MultiPHP Selector and Why Choosing Your PHP Version is Important

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 is a component that sits on top of CageFS 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). 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 to switch the PHP handler and test their site to see what issues they may run into once the PHP version is changed while being able to swap back and correct any issues before the server’s PHP version is changed.

VMware Hosting – ESXi Hypervisor

Why use Multiple Versions  of PHP in cPanel

Using multiple versions of PHP in cPanel is particularly important for web developers and server administrators, like yourself, who manage diverse websites requiring different PHP versions for optimal performance and compatibility. Here’s an in-depth look at why utilizing multiple PHP versions in cPanel is beneficial:

1. Compatibility with Diverse Applications:

  • Different Requirements: Various web applications and CMS platforms (like WordPress, Joomla, or Drupal) have specific PHP version requirements. Some might run on older versions, while others need the latest version for optimal functionality.
  • Legacy Support: Older websites built on legacy code might not be compatible with newer PHP versions. Having the ability to use an older PHP version ensures these sites continue to function correctly.

2. Testing and Development:

  • Development Flexibility: When developing new websites or applications, you might need to test them on different PHP versions to ensure compatibility and performance.
  • Staging Environments: For staging environments, it’s crucial to mimic the PHP version used in the production environment, which might be different across various projects.

3. Security and Performance:

  • Security Updates: Newer PHP versions often include security enhancements. The ability to switch to the latest version can protect your websites from vulnerabilities found in older versions.
  • Performance Improvements: New PHP versions typically come with performance optimizations, leading to faster website loading times and improved efficiency.

4. Client Requirements and Preferences:

  • Diverse Client Needs: If you’re hosting websites for multiple clients, they might have different requirements or preferences for PHP versions.
  • Customization: Offering multiple PHP versions adds a layer of customization to your hosting services, enhancing client satisfaction.

5. Smooth Transition and Upgrades:

  • Gradual Migration: When upgrading to a newer PHP version, you can test and transition websites gradually without disrupting the live environment.
  • Rollback Options: If an upgrade leads to compatibility issues, you can quickly revert to an older version to ensure website stability.

6. Compliance and Standards:

  • Industry Standards: Certain industries might have standards or regulatory requirements that dictate specific PHP versions.
  • Best Practices: Following best practices in web development often involves using specific PHP versions for certain types of websites or applications.

7. Plugin and Theme Compatibility:

  • Wide Range of Extensions: Websites using a variety of plugins and themes might require specific PHP versions for these extensions to work correctly and efficiently.

The ability to use multiple PHP versions in cPanel is a critical feature for web hosting, offering flexibility, security, and compatibility across various websites and applications. As a website developer and server administrator, leveraging this feature allows you to cater to a wide range of websites, ensure smooth transitions during upgrades, and maintain high standards of security and performance. It’s a key aspect of providing versatile and reliable web hosting services.

Australian cPanel Hosting

Previous Post
Update to WHM’s Create Ticket Interface
Next Post
WordPress – Joomla! – Drupal- A Security Comparison

Get Online Today!

  

Your perfect domain name is waiting!

Search our huge portfolio for more domain name extensions and pricing below
domain name extensions

Classic Domain Names

.COM | .AU | .CO | .NET | .BIZ | .ME | .EU | .ASIA | .TV | .MOBI | .NAME | .INFO | .ORG | .US | .NL| .FM | .HK | .ES | .CO.NZ | .DE | .CO.UK | .RU | .IM | .PM | .TW | .FR | .CN | .CA | .CH | .VN | .PL | .IL | .JP | .KR |