- Plesk for Linux
Fresh Prestashop installation is showing blank page;
The following error is shown in Domains > example.com > Logs (
CONFIG_TEXT: mod_fcgid: stderr: PHP Fatal error: Call to undefined function mcrypt_encrypt() in /var/www/vhosts/example.com/httpdocs/prestashop/classes/Rijndael.php on line 50
If PHP by OS vendor is used on the domain, the following command shows no output:
# rpm -qa | grep php-mcrypt
PHP 7.2 or newer is used on the domain
'php-mcrypt' module is not installed on the server, or it is not supported by the used PHP handler.
Connect to the server via SSH;
Install 'php-mcrypt' module:
For RHEL-based OSs:
# yum install php-mcrypt
For Debian-based OSs:
# apt-get install php5-mcrypt
Find additional PHP
# php -i | grep "Scan this dir for additional .ini files"
Scan this dir for additional .ini files => /etc/php.d
Add the configuration file
mcrypt.inito load the extension:
# echo "extension=mcrypt.so" >> /etc/php.d/mcrypt.ini
Note: PHP dropped mcrypt from PHP core starting from 7.2: Moving MCrypt to PECL
Change PHP version to 7.1 or older: How to change PHP settings/version for a domain in Plesk?