This article explains how to handle Mcrypt Error.
The following error is logged after upgrade to version 4.93.0 and above:
PHP Fatal error: Uncaught Error: Call to undefined function mcrypt_get_iv_size() in /home/llaborate/my.llaborate.co.uk/__swift/library/class.SWIFT.php:16
#0 /home/llaborate/my.llaborate.co.uk/__swift/library/class.SWIFT.php(16): SWIFT_License::DecodeKey('<?php /* [6b1be...')
#1 /home/llaborate/my.llaborate.co.uk/__swift/library/class.SWIFT.php(16): SWIFT_License::Load()
#2 /home/llaborate/my.llaborate.co.uk/__swift/swift.php(16): require_once('/home/llaborate...')
#3 /home/llaborate/my.llaborate.co.uk/cron/index.php(29): require_once('/home/llaborate...')
thrown in /home/llaborate/my.llaborate.co.uk/__swift/library/class.SWIFT.php on line 16
- PHP 7.1+ does not support mcrypt extension anymore.
- Kayako v4.93 uses mcrypt polyfill library.
- The polyfill library adds the functions that used to be provided by the mcrypt library but using openSSL instead of mcrypt.
- OpenSSL is mandatory for Kayako if you are using the PHP 7 and latest build of Kayako.
To fix this error, you would need to edit the PHP configuration file (php.ini) on the server. Please be careful while editing the PHP configuration file as it may affect the other services sharing the same PHP configuration. Please consult your server admin to make these changes.
While you are accessing the php.ini file in edit mode, verify that
- ext-mcrypt module is disabled in PHP.ini file
- ext-openssl module is enabled in PHP.ini file
- If ext-mcrypt is disabled and ext-openssl is enabled, purge the contents of the __swift/cache folder and try again.