Prestashop blank page with PHP Fatal error: Call to undefined function mcrypt_encrypt()

Created:

2016-11-16 12:46:33 UTC

Modified:

2017-08-16 16:04:22 UTC

6

Was this article helpful?


Have more questions?

Submit a request

Prestashop blank page with PHP Fatal error: Call to undefined function mcrypt_encrypt()

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.x for Linux
  • Plesk 12.0 for Linux

Symptoms

After installing Prestashop application blank page is shown with the following errors in domain ' error_log ':

[Mon Oct 07 05:58:34 2013] [warn] [client 111.93.188.66] 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
[Mon Oct 07 06:00:02 2013] [warn] [client 111.93.188.66] 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
[Mon Oct 07 06:00:58 2013] [warn] [client 107.201.113.83] 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

Cause

' php-mcrypt ' module is not installed

[root@hostname]# rpm -qa | grep php-mcrypt
[root@hostname]#

Resolution

Enable ' php-mcrypt ' support for the domain:

For Linux:

  1. Install ' php-mcrypt ' on the server:

    # yum install php-mcrypt

    For Debian/Ubuntu:

    # apt-get install php5-mcrypt

  2. Find the directory with with additional .ini files of PHP:

    # php -i | grep "Scan this dir for additional .ini files"
    Scan this dir for additional .ini files => /etc/php.d
  3. Add the below extension to mcrypt.ini :

    # echo "extension=mcrypt.so" >> /etc/php.d/mcrypt.ini
Have more questions? Submit a request
Please sign in to leave a comment.