Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

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

 
apachecentoscloudlinuxdebiandomains

Question

mcrypt module is missing for PHP in Tools & Settings > PHP Settings > <PHP version>.
How to install the php-mcrypt module on a Plesk server?

Answer

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

For other PHP handler versions, mcrypt module must be compiled manually:

For Plesk PHP 7.2 and later versions

Note: mcrypt extension was recently updated and now supports PHP 7.2 and newer. Vote for this feature suggestion for mcrypt support out of the box.

Note: the same procedure can be applied for PHP 7.3 and 7.4

  1. Connect to the server via SSH

  2. Install the required dependencies:

    • On RHEL, CentOS and CloudLinux:

      # yum install -y epel-release

      # yum install --enablerepo=epel -y plesk-php72-devel gcc libmcrypt-devel make

    • On Debian and Ubuntu:

      # apt install -y plesk-php72-dev gcc libmcrypt-dev make libc6-dev

  3. Update pecl.php.net protocols:

    # /opt/plesk/php/7.2/bin/pecl channel-update pecl.php.net

  4. Build the mcrypt extension:

    # /opt/plesk/php/7.2/bin/pecl install mcrypt-1.0.1

    Note: for PHP 7.3 use mcrypt-1.0.2, and mcrypt-1.0.4 for PHP 7.4
    for example: /opt/plesk/php/7.4/bin/pecl install mcrypt

  5. Enable the extension in PHP configuration:

    # echo 'extension=mcrypt.so' > /opt/plesk/php/7.2/etc/php.d/mcrypt.ini

  6. Refresh information about installed PHP modules

    # plesk bin php_handler --reread

  7. To apply changes reload web server Apache (or nginx if Apache is not used) and PHP-FPM service:
    On Ubuntu, Debian:

    # service apache2 reload
    # service plesk-php72-fpm reload

    On CentOS:

    # service httpd reload
    # service plesk-php72-fpm reload

  8. (optional) to make mcrypt manageable via Tools & Settings > PHP Settings > PHP 7.2 > Extensions tab, open php.ini tab under the same path and add extension=mcrypt.so under Dynamic Extensions section. Click OK.

For PHP provided by OS vendor

  1. Connect to a Plesk server via SSH

  2. Install the module:

    • On RHEL-based distributions (RHEL, CentOS, CloudLinux):

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

    • on Debian-based distributions (Debian, Ubuntu):

      # apt-get install php5-mcrypt -y || apt-get install mcrypt php7.0-mcrypt -y || apt-get install php-mcrypt -y

  3. Refresh information about installed PHP modules

    # plesk bin php_handler --reread

  4. Reload PHP-FPM and Apache  (or nginx if Apache is not used) to make the module available for websites:

    # systemctl reload php-fpm php7.0-fpm apache2 httpd

Solution to fix "Autoconf version 2.68 or higher is required"

Note: In case of below the error

error: Autoconf version 2.68 or higher is required
/usr/bin/m4 failed with exit status: 63

first following steps should be applied to replace Autconf version 2.63 with Autoconf version 2.68 provided by Plesk:

# mv /usr/bin/autoconf{,.bkps}
# ln -s /usr/bin/autoconf268 /usr/bin/autoconf
# mv /usr/bin/autom4te{,.bkps}
# ln -s /usr/bin/autom4te268 /usr/bin/autom4te

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

Your Complete .htaccess Guide: Including .htaccess Basics and More

Read More »

NGINX vs Apache – Which Is the Best Web Server in 2024?

Read More »

Top Web Servers For Linux And Windows

Read More »
Knowledge Base

How to find and edit PHP configuration files in Plesk for a domain or for global PHP handler

Read More »

How to allow access to a website directory from specific IP address in Plesk?

Read More »

Websites on Plesk server are slow or show error 500 or PHP mail cannot be sent: ap_pass_brigade failed

Read More »

All websites hosted in Plesk are not accessible over HTTPS: 502 Bad Gateway or ERR_CONNECTION_REFUSED

Read More »

Hosting Wiki

  • Cross Site Request Forgery (CSRF)
  • Cross-Origin Resource Sharing (CORS)
  • Server Redundancy
  • Postfix
  • PostgreSQL
  • DDoS
  • Bare Metal Server
  • PhpMyAdmin
  • phpPgAdmin
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • PHP
  • Domain
  • Hosting Control Panel
  • Plesk
  • NoSQL Database
  • Apache Tomcat
  • NGINX
  • Apache
  • Web Server
  • DNS Server
  • SSH
  • Colocation Hosting
  • Reseller Hosting
  • Cloud Hosting
  • VPS Hosting
  • Dedicated Hosting
  • Shared Hosting
  • Free Hosting
  • Managed Hosting
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family