Error "The 'mcrypt' extension was not found" while installing application on domain

Created:

2016-11-16 13:22:46 UTC

Modified:

2017-08-16 17:13:37 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Error "The 'mcrypt' extension was not found" while installing application on domain

Applicable to:

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

Symptoms

Application(for e.g. OpenCart ) installation fails with the following error:

The 'mcrypt' extension was not found

or with the following one:

The 'json' extension was not found

Also the following errors can be found in /var/log/plesk/panel.log :

[Thu Feb 20 16:06:32 2014] [error] [client 10.53.178.246] PHP Fatal error:  Call to undefined function json_decode() in /var/www/vhosts/domain.tld/httpdocs/includes/modules/shipping/usps.php on line 293, referer: http://sub.domain.tld/index.php?cPath=43&osCsid=6cgjlip1ceu28frba0n4hm8ve2
[Thu Feb 20 16:06:37 2014] [error] [client 10.53.178.246] PHP Fatal error: Call to undefined function json_decode() in /var/www/vhosts/domain.tld/httpdocs/includes/modules/shipping/usps.php on line 293, referer: http://sub.domain.tld/shopping_cart.php
[Thu Feb 20 16:06:40 2014] [error] [client 10.53.178.246] PHP Fatal error: Call to undefined function json_decode() in /var/www/vhosts/domain.tld/httpdocs/includes/modules/shipping/usps.php on line 293, referer:

Cause

Required PHP extensions extensions are not installed or disabled in configuration files.

Resolution

  1. Check that required extension is installed:

    # php-cgi -m |grep mcrypt
    mcrypt
    # php-cgi -m |grep json
    json

    Or with the following command:

    # rpm -qa |grep php-mcrypt
    php-mcrypt-5.4.37-43.el6.art.x86_64
    # rpm -qa |grep php-json
    php-json-5.4.37-43.el6.art.x86_64

    If it is not, install it using yum / apt-get command.

  2. Make sure that it is not commented in configuration files:

    # grep mcrypt /etc/php.d/mcrypt.ini
    extension=mcrypt.so
    # grep json /etc/php.d/json.ini
    extension=json.so
  3. Reconfigure your website were you want to install application:

    # /usr/local/psa/admin/bin/httpdmng --reconfigure-domain domain.tld
Have more questions? Submit a request
Please sign in to leave a comment.