Install mcrypt for php7.2


Do not use this guide if you are not using HostBill installed using quick install script, and you're not using php 7.2

Mcrypt library support was deprecated in PHP 7.1 and removed from PHP 7.2 completely. Underlying libmcrypt library though not updated for a long time is considered stable and used by many extensions, including some HostBill modules. If you're warned about missing mcrypt extension, you can install it to your php using this guide.

Note: This guide assumes you've installed Hostbill using auto-install bash script on Centos 7, resulting in PHP 7.2

  1. Login to your HostBill server over ssh as root
  2. Run following commands:

    yum -y  gcc install php72u-devel  pear1u  libmcrypt-devel
    pecl channel-update 
    pecl install mcrypt-1.0.1
  3. You will be prompted for libmcrypt prefix, hit enter:

    libmcrypt prefix? [autodetect] :
  4. Finish installation by adding entry to php ini & restart php-fpm:

    echo '' >> /etc/php.ini
    systemctl restart php-fpm