- Plesk Onyx for Linux
- Plesk for Linux
- Unable to install Magento 2.1 application:
PLESK_ERROR: Error: The following error has occurred during the installation of application: Installation of magento at http://example.tld/ failed. Non-zero exit status returned by script. Output stream: 'PHP Fatal error: Uncaught Exception: Deprecated Functionality: Function mcrypt_module_open() is deprecated in /var/www/vhosts/example.tld/httpdocs/vendor/magento/framework/Encryption/Crypt.php on line 54.
- PHP version 7.1 or higher is used.
- The following error may be shown on the website with already installed Magento or in website logs:
CONFIG_TEXT: main.CRITICAL: Exception: Deprecated Functionality: Function mcrypt_module_open() is deprecated in /var/www/vhosts/example.com/httpdocs/vendor/magento/framework/Encryption/Crypt.php on line 54 in /var/www/vhosts/example.com/httpdocs/vendor/magento/framework/App/ErrorHandler.php:61
The mcrypt extension has been removed from PHP starting from the version 7.1.
For more information, see:
Update Magento to the latest version.
If the issue persists or upgrade is not possible, open the file mentioned in error using Plesk > Domains > example.com > File Manager -
and replace the string:
CONFIG_TEXT: $this->_handle = mcrypt_module_open($cipher, '', $mode, '');
CONFIG_TEXT: $this->_handle = @mcrypt_module_open($cipher, '', $mode, '');
Navigate to Domains > example.com > PHP Settings.
Select PHP version lower than 7.1.x.