Compiling php-mcrypt for version PHP 5.6 possible?

Hi,

I have an older opencart store that requires PHP 5.6 to work properly. Version is selected, but it still errors out due to:

PHP Fatal error:  Call to undefined function mcrypt_create_iv() in /var/www/html/system/library/encryption.php on line
 8                          

What’s the supported way to enable the mcrypt extension?

Is it possible to enable it for this user’s pool or it will be done for all sites using PHP 5.6?

See Multiversion PHP > Installing Modules. This will affect all sites that use PHP 5.6, which should be none from a liability perspective. Heaven knows how many CVEs are baked into that site.

I ran this, but it still didn’t get loaded.

upcp -sb --var=mcrypt --var=php_version=5.6 --var=multiphp_build=true php/install-extensions

The result::

PLAY [localhost] ***************************************************************
included: /usr/local/apnscp/resources/playbooks/roles/php/install-extensions/tasks/verify-and-install.yml for localhost
included: /usr/local/apnscp/resources/playbooks/roles/php/install-extensions/tasks/populate-module-ini.yml for localhost
[WARNING]: flush_handlers task does not support when conditional

PLAY RECAP *********************************************************************
localhost                  : ok=24   changed=0    unreachable=0    failed=0    skipped=7    rescued=0    ignored=0

When trying to “php -i | grep mcrypt” while logged in as the site user in the web terminal, i get nothing as well:

[shopdem1@web1 php-fpm]$ php -i | grep mcrypt   
PHP Warning:  Unknown: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_
default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the tim
ezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Unknown on line 0

I already restarted the user’s pool. Any ideas how to proceed?

Updated the documentation, typo. It should read --var=pecl_extensions=xyz instead of --var=xyz.

Something broken.

I ran it twice - output is second attempt.

It probably needs php56-devel library or the equivalent of the package ApisCP is using?

[root@web1 ~]# upcp -sb --var=pecl_extensions=mcrypt --var=php_version=5.6 --var=multiphp_build=true php/install-extensions

PLAY [localhost] ****************************************************************************************************************************************************************
included: /usr/local/apnscp/resources/playbooks/roles/php/install-extensions/tasks/verify-and-install.yml for localhost

TASK [php/install-extensions : Build and install mcrypt library.] ***************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["/usr/local/apnscp/resources/playbooks/roles/php/install-extensions/files/installPecl.sh", "mcrypt", ""], "delta": "0:00:03.041580", "end": "2025-01-05 21:03:13.886993", "msg": "non-zero return code", "rc": 2, "start": "2025-01-05 21:03:10.845413", "stderr": "configure: WARNING: you should use --build, --host, --target\nmkdir: cannot create directory '.libs': File exists\n/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt.c:42:10: fatal error: zend_smart_str.h: No such file or directory\n #include \"zend_smart_str.h\"\n          ^~~~~~~~~~~~~~~~~~\ncompilation terminated.\nmake: *** [Makefile:181: mcrypt.lo] Error 1\nmake: *** Waiting for unfinished jobs....\n/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c: In function ‘php_mcrypt_filter’:\n/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c:47:22: warning: implicit declaration of function ‘Z_PTR’ [-Wimplicit-function-declaration]\n  if (!thisfilter || !Z_PTR(thisfilter->abstract)) {\n                      ^~~~~\n/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c:52:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]\n  data = (php_mcrypt_filter_data *)(Z_PTR(thisfilter->abstract));\n         ^\n/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c: In function ‘php_mcrypt_filter_dtor’:\n/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c:128:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]\n   php_mcrypt_filter_data *data = (php_mcrypt_filter_data*) Z_PTR(thisfilter->abstract);\n                                  ^\n/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c: In function ‘php_mcrypt_filter_create’:\n/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c:177:17: warning: implicit declaration of function ‘zend_hash_str_find’; did you mean ‘zend_hash_find’? [-Wimplicit-function-declaration]\n  if ((tmpzval = zend_hash_str_find(Z_ARRVAL_P(filterparams), ZEND_STRL(\"mode\")))) {\n                 ^~~~~~~~~~~~~~~~~~\n                 zend_hash_find\n/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c:177:15: warning: assignment to ‘zval *’ {aka ‘struct _zval_struct *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]\n  if ((tmpzval = zend_hash_str_find(Z_ARRVAL_P(filterparams), ZEND_STRL(\"mode\")))) {\n               ^\n/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c:185:14: warning: assignment to ‘zval *’ {aka ‘struct _zval_struct *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]\n  if ((tmpzval=zend_hash_str_find(Z_ARRVAL_P(filterparams), ZEND_STRL(\"algorithms_dir\")))) {\n              ^\n/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c:193:14: warning: assignment to ‘zval *’ {aka ‘struct _zval_struct *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]\n  if ((tmpzval=zend_hash_str_find(Z_ARRVAL_P(filterparams), ZEND_STRL(\"modes_dir\")))) {\n              ^\n/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c:201:15: warning: assignment to ‘zval *’ {aka ‘struct _zval_struct *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]\n  if ((tmpzval = zend_hash_str_find(Z_ARRVAL_P(filterparams), ZEND_STRL(\"key\"))) &&\n               ^\n/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c:221:16: warning: assignment to ‘zval *’ {aka ‘struct _zval_struct *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]\n  if (!(tmpzval = zend_hash_str_find(Z_ARRVAL_P(filterparams), ZEND_STRL(\"iv\"))) ||\n                ^\n/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c: At top level:\n/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c:273:2: warning: initialization of ‘php_stream_filter * (*)(const char *, zval *, int)’ {aka ‘struct _php_stream_filter * (*)(const char *, struct _zval_struct *, int)’} from incompatible pointer type ‘php_stream_filter * (*)(const char *, zval *, uint8_t)’ {aka ‘struct _php_stream_filter * (*)(const char *, struct _zval_struct *, unsigned char)’} [-Wincompatible-pointer-types]\n  php_mcrypt_filter_create\n  ^~~~~~~~~~~~~~~~~~~~~~~~\n/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c:273:2: note: (near initialization for ‘php_mcrypt_filter_factory.create_filter’)", "stderr_lines": ["configure: WARNING: you should use --build, --host, --target", "mkdir: cannot create directory '.libs': File exists", "/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt.c:42:10: fatal error: zend_smart_str.h: No such file or directory", " #include \"zend_smart_str.h\"", "          ^~~~~~~~~~~~~~~~~~", "compilation terminated.", "make: *** [Makefile:181: mcrypt.lo] Error 1", "make: *** Waiting for unfinished jobs....", "/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c: In function ‘php_mcrypt_filter’:", "/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c:47:22: warning: implicit declaration of function ‘Z_PTR’ [-Wimplicit-function-declaration]", "  if (!thisfilter || !Z_PTR(thisfilter->abstract)) {", "                      ^~~~~", "/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c:52:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]", "  data = (php_mcrypt_filter_data *)(Z_PTR(thisfilter->abstract));", "         ^", "/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c: In function ‘php_mcrypt_filter_dtor’:", "/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c:128:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]", "   php_mcrypt_filter_data *data = (php_mcrypt_filter_data*) Z_PTR(thisfilter->abstract);", "                                  ^", "/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c: In function ‘php_mcrypt_filter_create’:", "/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c:177:17: warning: implicit declaration of function ‘zend_hash_str_find’; did you mean ‘zend_hash_find’? [-Wimplicit-function-declaration]", "  if ((tmpzval = zend_hash_str_find(Z_ARRVAL_P(filterparams), ZEND_STRL(\"mode\")))) {", "                 ^~~~~~~~~~~~~~~~~~", "                 zend_hash_find", "/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c:177:15: warning: assignment to ‘zval *’ {aka ‘struct _zval_struct *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]", "  if ((tmpzval = zend_hash_str_find(Z_ARRVAL_P(filterparams), ZEND_STRL(\"mode\")))) {", "               ^", "/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c:185:14: warning: assignment to ‘zval *’ {aka ‘struct _zval_struct *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]", "  if ((tmpzval=zend_hash_str_find(Z_ARRVAL_P(filterparams), ZEND_STRL(\"algorithms_dir\")))) {", "              ^", "/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c:193:14: warning: assignment to ‘zval *’ {aka ‘struct _zval_struct *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]", "  if ((tmpzval=zend_hash_str_find(Z_ARRVAL_P(filterparams), ZEND_STRL(\"modes_dir\")))) {", "              ^", "/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c:201:15: warning: assignment to ‘zval *’ {aka ‘struct _zval_struct *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]", "  if ((tmpzval = zend_hash_str_find(Z_ARRVAL_P(filterparams), ZEND_STRL(\"key\"))) &&", "               ^", "/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c:221:16: warning: assignment to ‘zval *’ {aka ‘struct _zval_struct *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]", "  if (!(tmpzval = zend_hash_str_find(Z_ARRVAL_P(filterparams), ZEND_STRL(\"iv\"))) ||", "                ^", "/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c: At top level:", "/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c:273:2: warning: initialization of ‘php_stream_filter * (*)(const char *, zval *, int)’ {aka ‘struct _php_stream_filter * (*)(const char *, struct _zval_struct *, int)’} from incompatible pointer type ‘php_stream_filter * (*)(const char *, zval *, uint8_t)’ {aka ‘struct _php_stream_filter * (*)(const char *, struct _zval_struct *, unsigned char)’} [-Wincompatible-pointer-types]", "  php_mcrypt_filter_create", "  ^~~~~~~~~~~~~~~~~~~~~~~~", "/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c:273:2: note: (near initialization for ‘php_mcrypt_filter_factory.create_filter’)"], "stdout": "/usr/local/apnscp/storage/tmp/extension.1pQlQu3 /usr/local/apnscp/resources/playbooks\ndownloading mcrypt-1.0.7.tgz ...\nStarting to download mcrypt-1.0.7.tgz (27,060 bytes)\n.........done: 27,060 bytes\nFile /usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7.tgz downloaded\n/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7 /usr/local/apnscp/storage/tmp/extension.1pQlQu3 /usr/local/apnscp/resources/playbooks\nConfiguring for:\nPHP Api Version:         20131106\nZend Module Api No:      20131226\nZend Extension Api No:   220131226\nchecking for grep that handles long lines and -e... /usr/bin/grep\nchecking for egrep... /usr/bin/grep -E\nchecking for a sed that does not truncate output... /usr/bin/sed\nchecking for cc... cc\nchecking whether the C compiler works... yes\nchecking for C compiler default output file name... a.out\nchecking for suffix of executables... \nchecking whether we are cross compiling... no\nchecking for suffix of object files... o\nchecking whether we are using the GNU C compiler... yes\nchecking whether cc accepts -g... yes\nchecking for cc option to accept ISO C89... none needed\nchecking how to run the C preprocessor... cc -E\nchecking for icc... no\nchecking for suncc... no\nchecking whether cc understands -c and -o together... yes\nchecking for system library directory... lib\nchecking if compiler supports -R... no\nchecking if compiler supports -Wl,-rpath,... yes\nchecking build system type... x86_64-unknown-linux-gnu\nchecking host system type... x86_64-unknown-linux-gnu\nchecking target system type... x86_64-unknown-linux-gnu\nchecking for PHP prefix... /\nchecking for PHP includes... -I//.socket/php/multiphp/native/5.6/include/php -I//.socket/php/multiphp/native/5.6/include/php/main -I//.socket/php/multiphp/native/5.6/include/php/TSRM -I//.socket/php/multiphp/native/5.6/include/php/Zend -I//.socket/php/multiphp/native/5.6/include/php/ext -I//.socket/php/multiphp/native/5.6/include/php/ext/date/lib\nchecking for PHP extension directory... /usr/lib64/20131226\nchecking for PHP installed headers prefix... //.socket/php/multiphp/native/5.6/include/php\nchecking if debug is enabled... no\nchecking if zts is enabled... no\nchecking for re2c... re2c\nchecking for re2c version... 0.14.3 (ok)\nchecking for gawk... gawk\nchecking for mcrypt support... yes, shared\nchecking for libmcrypt version... >= 2.5.6\nchecking for mcrypt_module_open in -lmcrypt... yes\nchecking for ld used by cc... /usr/bin/ld\nchecking if the linker (/usr/bin/ld) is GNU ld... yes\nchecking for /usr/bin/ld option to reload object files... -r\nchecking for BSD-compatible nm... /usr/bin/nm -B\nchecking whether ln -s works... yes\nchecking how to recognize dependent libraries... pass_all\nchecking for ANSI C header files... yes\nchecking for sys/types.h... yes\nchecking for sys/stat.h... yes\nchecking for stdlib.h... yes\nchecking for string.h... yes\nchecking for memory.h... yes\nchecking for strings.h... yes\nchecking for inttypes.h... yes\nchecking for stdint.h... yes\nchecking for unistd.h... yes\nchecking dlfcn.h usability... yes\nchecking dlfcn.h presence... yes\nchecking for dlfcn.h... yes\nchecking the maximum length of command line arguments... 1572864\nchecking command to parse /usr/bin/nm -B output from cc object... ok\nchecking for objdir... .libs\nchecking for ar... ar\nchecking for ranlib... ranlib\nchecking for strip... strip\nchecking if cc supports -fno-rtti -fno-exceptions... no\nchecking for cc option to produce PIC... -fPIC\nchecking if cc PIC flag -fPIC works... yes\nchecking if cc static flag -static works... yes\nchecking if cc supports -c -o file.o... yes\nchecking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes\nchecking whether -lc should be explicitly linked in... no\nchecking dynamic linker characteristics... GNU/Linux ld.so\nchecking how to hardcode library paths into programs... immediate\nchecking whether stripping libraries is possible... yes\nchecking if libtool supports shared libraries... yes\nchecking whether to build shared libraries... yes\nchecking whether to build static libraries... no\n\ncreating libtool\nappending configuration tag \"CXX\" to libtool\nconfigure: creating ./config.status\nconfig.status: creating config.h\n/bin/sh /usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/libtool --mode=compile cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7 -DPHP_ATOM_INC -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/include -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/main -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7 -I//.socket/php/multiphp/native/5.6/include/php -I//.socket/php/multiphp/native/5.6/include/php/main -I//.socket/php/multiphp/native/5.6/include/php/TSRM -I//.socket/php/multiphp/native/5.6/include/php/Zend -I//.socket/php/multiphp/native/5.6/include/php/ext -I//.socket/php/multiphp/native/5.6/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt.c -o mcrypt.lo \n/bin/sh /usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/libtool --mode=compile cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7 -DPHP_ATOM_INC -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/include -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/main -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7 -I//.socket/php/multiphp/native/5.6/include/php -I//.socket/php/multiphp/native/5.6/include/php/main -I//.socket/php/multiphp/native/5.6/include/php/TSRM -I//.socket/php/multiphp/native/5.6/include/php/Zend -I//.socket/php/multiphp/native/5.6/include/php/ext -I//.socket/php/multiphp/native/5.6/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c -o mcrypt_filter.lo \nmkdir .libs\nmkdir .libs\n cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7 -DPHP_ATOM_INC -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/include -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/main -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7 -I//.socket/php/multiphp/native/5.6/include/php -I//.socket/php/multiphp/native/5.6/include/php/main -I//.socket/php/multiphp/native/5.6/include/php/TSRM -I//.socket/php/multiphp/native/5.6/include/php/Zend -I//.socket/php/multiphp/native/5.6/include/php/ext -I//.socket/php/multiphp/native/5.6/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt.c  -fPIC -DPIC -o .libs/mcrypt.o\n cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7 -DPHP_ATOM_INC -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/include -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/main -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7 -I//.socket/php/multiphp/native/5.6/include/php -I//.socket/php/multiphp/native/5.6/include/php/main -I//.socket/php/multiphp/native/5.6/include/php/TSRM -I//.socket/php/multiphp/native/5.6/include/php/Zend -I//.socket/php/multiphp/native/5.6/include/php/ext -I//.socket/php/multiphp/native/5.6/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c  -fPIC -DPIC -o .libs/mcrypt_filter.o", "stdout_lines": ["/usr/local/apnscp/storage/tmp/extension.1pQlQu3 /usr/local/apnscp/resources/playbooks", "downloading mcrypt-1.0.7.tgz ...", "Starting to download mcrypt-1.0.7.tgz (27,060 bytes)", ".........done: 27,060 bytes", "File /usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7.tgz downloaded", "/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7 /usr/local/apnscp/storage/tmp/extension.1pQlQu3 /usr/local/apnscp/resources/playbooks", "Configuring for:", "PHP Api Version:         20131106", "Zend Module Api No:      20131226", "Zend Extension Api No:   220131226", "checking for grep that handles long lines and -e... /usr/bin/grep", "checking for egrep... /usr/bin/grep -E", "checking for a sed that does not truncate output... /usr/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-unknown-linux-gnu", "checking host system type... x86_64-unknown-linux-gnu", "checking target system type... x86_64-unknown-linux-gnu", "checking for PHP prefix... /", "checking for PHP includes... -I//.socket/php/multiphp/native/5.6/include/php -I//.socket/php/multiphp/native/5.6/include/php/main -I//.socket/php/multiphp/native/5.6/include/php/TSRM -I//.socket/php/multiphp/native/5.6/include/php/Zend -I//.socket/php/multiphp/native/5.6/include/php/ext -I//.socket/php/multiphp/native/5.6/include/php/ext/date/lib", "checking for PHP extension directory... /usr/lib64/20131226", "checking for PHP installed headers prefix... //.socket/php/multiphp/native/5.6/include/php", "checking if debug is enabled... no", "checking if zts is enabled... no", "checking for re2c... re2c", "checking for re2c version... 0.14.3 (ok)", "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 for ld used by cc... /usr/bin/ld", "checking if the linker (/usr/bin/ld) is GNU ld... yes", "checking for /usr/bin/ld option to reload object files... -r", "checking for BSD-compatible nm... /usr/bin/nm -B", "checking whether ln -s works... yes", "checking how to recognize dependent libraries... pass_all", "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 dlfcn.h usability... yes", "checking dlfcn.h presence... yes", "checking for dlfcn.h... yes", "checking the maximum length of command line arguments... 1572864", "checking command to parse /usr/bin/nm -B output from cc object... ok", "checking for objdir... .libs", "checking for ar... ar", "checking for ranlib... ranlib", "checking for strip... strip", "checking if cc supports -fno-rtti -fno-exceptions... no", "checking for cc option to produce PIC... -fPIC", "checking if cc PIC flag -fPIC works... yes", "checking if cc static flag -static works... yes", "checking if cc supports -c -o file.o... 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", "", "creating libtool", "appending configuration tag \"CXX\" to libtool", "configure: creating ./config.status", "config.status: creating config.h", "/bin/sh /usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/libtool --mode=compile cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7 -DPHP_ATOM_INC -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/include -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/main -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7 -I//.socket/php/multiphp/native/5.6/include/php -I//.socket/php/multiphp/native/5.6/include/php/main -I//.socket/php/multiphp/native/5.6/include/php/TSRM -I//.socket/php/multiphp/native/5.6/include/php/Zend -I//.socket/php/multiphp/native/5.6/include/php/ext -I//.socket/php/multiphp/native/5.6/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt.c -o mcrypt.lo ", "/bin/sh /usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/libtool --mode=compile cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7 -DPHP_ATOM_INC -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/include -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/main -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7 -I//.socket/php/multiphp/native/5.6/include/php -I//.socket/php/multiphp/native/5.6/include/php/main -I//.socket/php/multiphp/native/5.6/include/php/TSRM -I//.socket/php/multiphp/native/5.6/include/php/Zend -I//.socket/php/multiphp/native/5.6/include/php/ext -I//.socket/php/multiphp/native/5.6/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c -o mcrypt_filter.lo ", "mkdir .libs", "mkdir .libs", " cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7 -DPHP_ATOM_INC -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/include -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/main -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7 -I//.socket/php/multiphp/native/5.6/include/php -I//.socket/php/multiphp/native/5.6/include/php/main -I//.socket/php/multiphp/native/5.6/include/php/TSRM -I//.socket/php/multiphp/native/5.6/include/php/Zend -I//.socket/php/multiphp/native/5.6/include/php/ext -I//.socket/php/multiphp/native/5.6/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt.c  -fPIC -DPIC -o .libs/mcrypt.o", " cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7 -DPHP_ATOM_INC -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/include -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/main -I/usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7 -I//.socket/php/multiphp/native/5.6/include/php -I//.socket/php/multiphp/native/5.6/include/php/main -I//.socket/php/multiphp/native/5.6/include/php/TSRM -I//.socket/php/multiphp/native/5.6/include/php/Zend -I//.socket/php/multiphp/native/5.6/include/php/ext -I//.socket/php/multiphp/native/5.6/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/apnscp/storage/tmp/extension.1pQlQu3/mcrypt-1.0.7/mcrypt_filter.c  -fPIC -DPIC -o .libs/mcrypt_filter.o"]}

PLAY RECAP **********************************************************************************************************************************************************************
localhost                  : ok=19   changed=0    unreachable=0    failed=1    skipped=5    rescued=0    ignored=0


No. The smart_str API was introduced in PHP7. None of the mcrypt releases available on PECL support PHP5.6, so this would require rebuilding PHP5.6…

cpcmd scope:set cp.bootstrapper php56_build_flags "--with-mcrypt"
upcp -sbf --var='php_multiphp=[5.6]' php/multiphp

What’s best since this webstore is likely handling financial information - they bring everything up to at least PHP7 norms, including Opencart itself. Opencart has information on their site for this. mcrypt functionality can be polyfilled using phpseclib/mcrypt_compat. For any custom code, Rector can iteratively bring a codebase to a newer PHP standard.

No Matt, this is just my own demo site to showcase two courier modules’ functionality. Unfortunately, the developers of these modules are a little bit hard to work with - the courier companies have outsourced this to third parties. I run the site for a friend’s “get your own online shop” 's business - just so he can provide an example web app(like a portfolio). If he setups OpenCart 2 on new stores, that’s him and his server problem, not mine.

I will rebuild PHP… I am too stupid to try re-factor the code - i don’t want to break those modules. Idk, i might just also leave it broken, cannot make up my mind.