How to install the php-mcrypt module on a Plesk server

Question

How to install the php-mcrypt module on a Plesk server?

Answer

Notes: The solution in this article is applicable to system PHP versions (Up to 7.1) supplied by OS vendor.

Plesk PHP handlers up to 7.1 are shipped with the mcrypt module by default. PHP handlers provided by Plesk can be installed via Plesk Installer and selected at Domains > example.com > PHP settings.

The mcrypt module is deprecated since PHP 7.1 and is moved out from core into PECL:
        PHP RFC: Deprecate (then Remove) Mcrypt
        PHP: Deprecated features in PHP 7.1.x

  1. Connect to a Plesk server via SSH.

  2. Install the module:

    • on CentOS/RHEL-based distributions:

      The php-mcrypt package is available in RPMforge and EPEL repositories. Add the repository to the server and install the package using the yum utility. In this example, we are using the EPEL repo:

      # yum install epel-release
      # yum install php-mcrypt

    • on Debian/Ubuntu-based distributions:

      Find the system PHP version:

      # php -v

      Run the command:

      • if PHP 5.x version is installed:

        # apt-get install php5-mcrypt

      • if PHP 7.x version is installed:

        # apt-get install php-mcrypt

  3. To make the mcrypt extension available for existing websites, update PHP settings for all domains with the command:

    # /usr/local/psa/bin/php_settings -u

    This extension will also appear in Plesk at Tools & Settings > PHP Settings > [php] by OS vendor.

  • plesk
  • 4 Users Found This Useful
Was this answer helpful?

Related Articles

Connecting using PuTTY on Windows workstations

Configuring PuTTY In PuTTY, under Session, enter your Host Name Under Connection choose Data...

Windows: Accessing Your Server with Remote Desktop

This article explains how to use Remote Desktop to access your Windows server’s desktop from...

What is Reverse DNS?

Reverse DNS (rDNS) is name resolution that looks up an IP addresses to obtain a domain name,...

What is Reverse DNS?

Reverse DNS (rDNS) is name resolution that looks up an IP addresses to obtain a domain name,...

How to disable directory browsing globally on whole WHM/cPanel server

o disable directory browsing/listing on whole server, follow these simple instructions: 1. Log...