Last active
March 3, 2021 23:44
-
-
Save kevinski303/88dedbb4734d4518e03556494be84ec7 to your computer and use it in GitHub Desktop.
php-mcrypt on debian 10 & php 7.3 apache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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.so | |
# | |
# 6; Enable in php.ini & restart apache | |
# | |
$ echo 'extension=mcrypt.so' >> /etc/php/7.3/apache2/php.ini | |
$ systemctl restart apache2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if you get the "configure: error: mcrypt.h not found. Please reinstall libmcrypt" error while "./configure", simply use
sudo apt install libmcrypt-dev
Then you can go on within number 4