Article ID: 124933, created on Mar 19, 2015, last review on Sep 3, 2015

  • Applies to:
  • Plesk Automation 11.5

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 
    

Search Words

The Encrypt library requires the Mcrypt extension

The 'mcrypt' extension was not found

php-mcrypt

php-json

json

mcrypt is missing [P1]

mcrypt

Plesk Open Cart php-mcrypt

jason error

33a70544d00d562bbc5b17762c4ed2b3 caea8340e2d186a540518d08602aa065 e0aff7830fa22f92062ee4db78133079

Email subscription for changes to this article
Save as PDF