Skip to content

Instantly share code, notes, and snippets.

@mahammad
Created December 3, 2021 06:28
Show Gist options
  • Select an option

  • Save mahammad/64e03ae0b7e73003a5d0e2deb25e130f to your computer and use it in GitHub Desktop.

Select an option

Save mahammad/64e03ae0b7e73003a5d0e2deb25e130f to your computer and use it in GitHub Desktop.

Revisions

  1. mahammad created this gist Dec 3, 2021.
    14 changes: 14 additions & 0 deletions how-to-install-mcrypt.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    yum install epel-release
    yum install libmcrypt libmcrypt-devel
    for version in $(ls /opt/cpanel|grep ea-php); do /opt/cpanel/${version}/root/usr/bin/pecl channel-update pecl.php.net; done

    export LC_ALL="C"
    export LANG="C"

    /opt/cpanel/ea-php72/root/usr/bin/pecl install channel://pecl.php.net/mcrypt-1.0.1
    /opt/cpanel/ea-php73/root/usr/bin/pecl install channel://pecl.php.net/mcrypt-1.0.2
    /opt/cpanel/ea-php74/root/usr/bin/pecl install channel://pecl.php.net/mcrypt-1.0.3

    service httpd restart

    for phpver in $(ls -1 /opt/cpanel/ |grep ea-php | sed 's/ea-php//g') ; do echo "PHP $phpver" ; /opt/cpanel/ea-php$phpver/root/usr/bin/php -m |grep -E 'mcrypt'; done