Skip to content

Instantly share code, notes, and snippets.

@kevinski303
Last active March 3, 2021 23:44
Show Gist options
  • Select an option

  • Save kevinski303/88dedbb4734d4518e03556494be84ec7 to your computer and use it in GitHub Desktop.

Select an option

Save kevinski303/88dedbb4734d4518e03556494be84ec7 to your computer and use it in GitHub Desktop.

Revisions

  1. kevinski303 revised this gist Mar 3, 2021. No changes.
  2. kevinski303 revised this gist Aug 16, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mcrypt_on_php7.3_.txt
    Original file line number Diff line number Diff line change
    @@ -31,7 +31,7 @@ $ make install
    #
    # 5; Check if the module is available
    #
    $ ls /usr/lib/php/20180731/ | grep mcrypt*
    $ ls /usr/lib/php/20180731/ | grep mcrypt.so

    #
    # 6; Enable in php.ini & restart apache
  3. kevinski303 revised this gist Aug 15, 2019. No changes.
  4. kevinski303 renamed this gist Aug 15, 2019. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  5. kevinski303 created this gist Aug 15, 2019.
    40 changes: 40 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,40 @@
    #
    # The php-mcrypt extension is depricated and therefore was removed from the apt repository.
    # As of writing this, on php7.3 there is currently no other way to install mcrypt without downgrading the php version
    # except for compiling it locally.
    #

    ###

    #
    # 1; Install the php-dev version and all the used tools to compile the extension
    #
    $ apt install php7.3-dev gcc make autoconf libc-dev pkg-config

    #
    # 2; Download the archive from pecl
    #
    $ pecl download channel://pecl.php.net/mcrypt-1.0.2

    #
    # 3; Extract the archive
    #
    $ tar -zxvf mcrypt-*.tgz && cd mcrypt-*/

    #
    # 4; Run phpize configuration and compile
    #
    $ phpize
    $ ./configure
    $ make install

    #
    # 5; Check if the module is available
    #
    $ ls /usr/lib/php/20180731/ | grep mcrypt*

    #
    # 6; Enable in php.ini & restart apache
    #
    $ echo 'extension=mcrypt.so' >> /etc/php/7.3/apache2/php.ini
    $ systemctl restart apache2