Ubuntu with PHP 7.2 and mcrypt module

As mentioned in our previous article PHP 7.2 or PHP 7.3 with mcrypt – manual build the PHP versions 7.2 and 7.3 do not include PHP mcrypt module. The mcrypt module was part of PHP 5 till 7.1, in which it was deprecated and removed in 7.2.
In this article we show how to build mcrypt module for Ubuntu based on our previous article showed above. Because of the great popularity of Ubuntu and it has no PHP mcrypt package in Ubuntu package system unlike other Linux distributions (like Gentoo, which created a package) we decided to make this article.

For our purpose we use Ubuntu 18.04.2 LTS and here is what the steps to have the mcrypt PHP module:

STEP 1) Update and install mcrypt library and header development packet

sudo apt update -y
sudo apt install -y libmcrypt-dev

STEP 2) Install the GNU GCC build utility and the PHP dev packet

This is the compiler to build the module.

sudo apt install -y build-essential
sudo apt install -y php7.2-dev

STEP 3) Download the PHP mcrypt module and build it.

cd
mkdir mcrypt-php-module-manual
cd mcrypt-php-module-manual
wget https://pecl.php.net/get/mcrypt-1.0.2.tgz
tar xzf mcrypt-1.0.2.tgz
cd mcrypt-1.0.2
phpize
aclocal
libtoolize --force
autoheader
autoconf
./configure
make
sudo make install

STEP 4) Load the module in the PHP configuration (we use PHP-FPM and PHP-CLI) and block future PHP versions to be installed when apt update is used.

Because we compile the PHP mcrypt module for the specific currently installed PHP we do not want to upgrade our PHP when there is an update and the mcrypt module to fail to load. Each change of the PHP version (upgrade) would require a recompile against the current PHP version. To see more for holding and unholding Ubuntu packages – apt-mark – upgrade with the exception of certain packages Of course, if there is an update for PHP you must install it just recompile the mcrypt package, too!

echo "extension=mcrypt.so" > 20-mcrypt.ini
sudo cp 20-mcrypt.ini /etc/php/7.2/cli/conf.d/20-mcrypt.ini
sudo cp 20-mcrypt.ini /etc/php/7.2/fpm/conf.d/20-mcrypt.ini
sudo apt-mark hold php-cli php7.2-cli php-fpm php7.2-fpm


To test:

myuser@my-server-pc:~/mcrypt-php-module-manual/mcrypt-1.0.2$ php -info|grep -i mcrypt
/etc/php/7.2/cli/conf.d/20-mcrypt.ini,
Registered Stream Filters => zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, convert.iconv.*, mcrypt.*, mdecrypt.*
mcrypt
mcrypt support => enabled
mcrypt_filter support => enabled
mcrypt.algorithms_dir => no value => no value
mcrypt.modes_dir => no value => no value
PWD => /home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2
OLDPWD => /home/myuser/mcrypt-php-module-manual
$_SERVER['PWD'] => /home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2
$_SERVER['OLDPWD'] => /home/myuser/mcrypt-php-module-manual

Almost full log of our build process

PHP 7.2 with mcrypt in 18.04.2 LTS (Bionic Beaver). It is essetially the same with Ubuntu 16, 17, and 19.

myuser@my-server-pc:~$ sudo apt update -y
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Fetched 252 kB in 6s (43.8 kB/s)                               
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
myuser@my-server-pc:~$ sudo apt install -y libmcrypt-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libmcrypt4
Suggested packages:
  mcrypt
The following NEW packages will be installed:
  libmcrypt-dev libmcrypt4
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 147 kB of archives.
After this operation, 659 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libmcrypt4 amd64 2.5.8-3.3 [63.0 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libmcrypt-dev amd64 2.5.8-3.3 [83.7 kB]
Fetched 147 kB in 1s (193 kB/s)         
Selecting previously unselected package libmcrypt4.
(Reading database ... 143974 files and directories currently installed.)
Preparing to unpack .../libmcrypt4_2.5.8-3.3_amd64.deb ...
Unpacking libmcrypt4 (2.5.8-3.3) ...
Selecting previously unselected package libmcrypt-dev.
Preparing to unpack .../libmcrypt-dev_2.5.8-3.3_amd64.deb ...
Unpacking libmcrypt-dev (2.5.8-3.3) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Setting up libmcrypt4 (2.5.8-3.3) ...
Setting up libmcrypt-dev (2.5.8-3.3) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
myuser@my-server-pc:~$ sudo apt install -y build-essential
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  binutils binutils-common binutils-x86-64-linux-gnu cpp cpp-7 dpkg-dev fakeroot g++ g++-7 gcc gcc-7 gcc-7-base libalgorithm-diff-perl libalgorithm-diff-xs-perl
  libalgorithm-merge-perl libasan4 libatomic1 libbinutils libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libdpkg-perl libfakeroot libfile-fcntllock-perl libgcc-7-dev
  libgomp1 libisl19 libitm1 liblsan0 libmpc3 libmpx2 libquadmath0 libstdc++-7-dev libtsan0 libubsan0 linux-libc-dev make manpages-dev
Suggested packages:
  binutils-doc cpp-doc gcc-7-locales debian-keyring g++-multilib g++-7-multilib gcc-7-doc libstdc++6-7-dbg gcc-multilib autoconf automake libtool flex bison gdb gcc-doc
  gcc-7-multilib libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan4-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg
  glibc-doc bzr libstdc++-7-doc make-doc
The following NEW packages will be installed:
  binutils binutils-common binutils-x86-64-linux-gnu build-essential cpp cpp-7 dpkg-dev fakeroot g++ g++-7 gcc gcc-7 gcc-7-base libalgorithm-diff-perl
  libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan4 libatomic1 libbinutils libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libdpkg-perl libfakeroot
  libfile-fcntllock-perl libgcc-7-dev libgomp1 libisl19 libitm1 liblsan0 libmpc3 libmpx2 libquadmath0 libstdc++-7-dev libtsan0 libubsan0
  linux-libc-dev make manpages-dev
0 upgraded, 42 newly installed, 0 to remove and 0 not upgraded.
Need to get 37.3 MB of archives.
After this operation, 161 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-common amd64 2.30-21ubuntu1~18.04.2 [193 kB]
.....
.....
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up build-essential (12.4ubuntu1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
myuser@my-server-pc:~$ sudo apt install -y php7.2-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  autoconf automake autopoint autotools-dev debhelper dh-autoreconf dh-strip-nondeterminism gettext intltool-debian libarchive-cpio-perl libarchive-zip-perl libcroco3
  libfile-stripnondeterminism-perl libltdl-dev libltdl7 libmail-sendmail-perl libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libssl-dev libsys-hostname-long-perl
  libtimedate-perl libtool m4 php-pear php-xml php7.2-xml pkg-php-tools po-debconf shtool
Suggested packages:
  autoconf-archive gnu-standards autoconf-doc dh-make dwz gettext-doc libasprintf-dev libgettextpo-dev libtool-doc libssl-doc gfortran | fortran95-compiler gcj-jdk m4-doc
  dh-php libmail-box-perl
The following NEW packages will be installed:
  autoconf automake autopoint autotools-dev debhelper dh-autoreconf dh-strip-nondeterminism gettext intltool-debian libarchive-cpio-perl libarchive-zip-perl libcroco3
  libfile-stripnondeterminism-perl libltdl-dev libltdl7 libmail-sendmail-perl libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libssl-dev libsys-hostname-long-perl
  libtimedate-perl libtool m4 php-pear php-xml php7.2-dev php7.2-xml pkg-php-tools po-debconf shtool
0 upgraded, 32 newly installed, 0 to remove and 0 not upgraded.
Need to get 8,123 kB of archives.
After this operation, 37.1 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 m4 amd64 1.4.18-1 [197 kB]
.....
.....
Processing triggers for libc-bin (2.27-3ubuntu1) ...
myuser@my-server-pc:~$ cd
myuser@my-server-pc:~$ mkdir mcrypt-php-module-manual
myuser@my-server-pc:~$ cd mcrypt-php-module-manual
myuser@my-server-pc:~/mcrypt-php-module-manual$ wget https://pecl.php.net/get/mcrypt-1.0.2.tgz
--2019-06-18 12:46:28--  https://pecl.php.net/get/mcrypt-1.0.2.tgz
Resolving pecl.php.net (pecl.php.net)... 104.236.228.160
Connecting to pecl.php.net (pecl.php.net)|104.236.228.160|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 33698 (33K) [application/octet-stream]
Saving to: ‘mcrypt-1.0.2.tgz’

mcrypt-1.0.2.tgz                           100%[========================================================================================>]  32.91K  --.-KB/s    in 0.1s    

2019-06-18 12:46:28 (306 KB/s) - ‘mcrypt-1.0.2.tgz’ saved [33698/33698]

myuser@my-server-pc:~/mcrypt-php-module-manual$ tar xzf mcrypt-1.0.2.tgz
myuser@my-server-pc:~/mcrypt-php-module-manual$ cd mcrypt-1.0.2
myuser@my-server-pc:~/mcrypt-php-module-manual/mcrypt-1.0.2$ phpize
Configuring for:
PHP Api Version:         20170718
Zend Module Api No:      20170718
Zend Extension Api No:   320170718
myuser@my-server-pc:~/mcrypt-php-module-manual/mcrypt-1.0.2$ aclocal
myuser@my-server-pc:~/mcrypt-php-module-manual/mcrypt-1.0.2$ libtoolize --force
libtoolize: putting auxiliary files in '.'.
libtoolize: linking file './ltmain.sh'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
myuser@my-server-pc:~/mcrypt-php-module-manual/mcrypt-1.0.2$ autoheader
myuser@my-server-pc:~/mcrypt-php-module-manual/mcrypt-1.0.2$ autoconf
myuser@my-server-pc:~/mcrypt-php-module-manual/mcrypt-1.0.2$ ./configure
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20170718
checking for PHP installed headers prefix... /usr/include/php/20170718
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for mcrypt support... yes, shared
checking for libmcrypt version... >= 2.5.6
checking for mcrypt_module_open in -lmcrypt... yes
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) gawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
myuser@my-server-pc:~/mcrypt-php-module-manual/mcrypt-1.0.2$ make
/bin/bash /home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2/libtool --mode=compile cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2 -DPHP_ATOM_INC -I/home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2/include -I/home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2/main -I/home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2 -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2/mcrypt.c -o mcrypt.lo 
libtool: compile:  cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2 -DPHP_ATOM_INC -I/home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2/include -I/home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2/main -I/home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2 -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2/mcrypt.c  -fPIC -DPIC -o .libs/mcrypt.o
/bin/bash /home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2/libtool --mode=compile cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2 -DPHP_ATOM_INC -I/home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2/include -I/home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2/main -I/home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2 -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2/mcrypt_filter.c -o mcrypt_filter.lo 
libtool: compile:  cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2 -DPHP_ATOM_INC -I/home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2/include -I/home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2/main -I/home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2 -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2/mcrypt_filter.c  -fPIC -DPIC -o .libs/mcrypt_filter.o
/bin/bash /home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2/libtool --mode=link cc -DPHP_ATOM_INC -I/home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2/include -I/home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2/main -I/home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2 -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib  -DHAVE_CONFIG_H  -g -O2    -o mcrypt.la -export-dynamic -avoid-version -prefer-pic -module -rpath /home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2/modules  mcrypt.lo mcrypt_filter.lo -lmcrypt -lltdl
libtool: link: cc -shared  -fPIC -DPIC  .libs/mcrypt.o .libs/mcrypt_filter.o   /usr/lib/libmcrypt.so /usr/lib/x86_64-linux-gnu/libltdl.so  -g -O2   -Wl,-soname -Wl,mcrypt.so -o .libs/mcrypt.so
libtool: link: ( cd ".libs" && rm -f "mcrypt.la" && ln -s "../mcrypt.la" "mcrypt.la" )
/bin/bash /home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2/libtool --mode=install cp ./mcrypt.la /home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2/modules
libtool: install: cp ./.libs/mcrypt.so /home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2/modules/mcrypt.so
libtool: install: cp ./.libs/mcrypt.lai /home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2/modules/mcrypt.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin" ldconfig -n /home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

myuser@my-server-pc:~/mcrypt-php-module-manual/mcrypt-1.0.2$ sudo make install
Installing shared extensions:     /usr/lib/php/20170718/
myuser@my-server-pc:~/mcrypt-php-module-manual/mcrypt-1.0.2$ ls -altr /usr/lib/php/20170718/mcrypt.so 
-rwxr-xr-x 1 root root 189184 Jun 18 12:50 /usr/lib/php/20170718/mcrypt.so
myuser@my-server-pc:~/mcrypt-php-module-manual/mcrypt-1.0.2$ echo "extension=mcrypt.so" > 20-mcrypt.ini
myuser@my-server-pc:~/mcrypt-php-module-manual/mcrypt-1.0.2$ cat 20-mcrypt.ini 
extension=mcrypt.so
myuser@my-server-pc:~/mcrypt-php-module-manual/mcrypt-1.0.2$ sudo cp 20-mcrypt.ini /etc/php/7.2/cli/conf.d/20-mcrypt.ini
myuser@my-server-pc:~/mcrypt-php-module-manual/mcrypt-1.0.2$ sudo cp 20-mcrypt.ini /etc/php/7.2/fpm/conf.d/20-mcrypt.ini
myuser@my-server-pc:~/mcrypt-php-module-manual/mcrypt-1.0.2$ php -info|grep -i mcrypt
/etc/php/7.2/cli/conf.d/20-mcrypt.ini,
Registered Stream Filters => zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, convert.iconv.*, mcrypt.*, mdecrypt.*
mcrypt
mcrypt support => enabled
mcrypt_filter support => enabled
mcrypt.algorithms_dir => no value => no value
mcrypt.modes_dir => no value => no value
PWD => /home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2
OLDPWD => /home/myuser/mcrypt-php-module-manual
$_SERVER['PWD'] => /home/myuser/mcrypt-php-module-manual/mcrypt-1.0.2
$_SERVER['OLDPWD'] => /home/myuser/mcrypt-php-module-manual
myuser@my-server-pc:~/mcrypt-php-module-manual/mcrypt-1.0.2$ sudo apt-mark hold php-cli php7.2-cli php-fpm php7.2-fpm
php-cli set on hold.
php7.2-cli set on hold.
php-fpm set on hold.
php7.2-fpm set on hold.

Leave a Reply

Your email address will not be published.